Skip to content

Instantly share code, notes, and snippets.

Forked from weotch/main.js
Last active Jan 22, 2021
What would you like to do?
// This our standard require js bootstrap file. It assumes you are using the
// require-jquery.js file that require.js provides
// Set the require.js configuration for the application
// Base path used to load scripts
baseUrl: 'js/',
// Prevent caching during dev
urlArgs: "bust=" + (new Date()).getTime(),
// Exclude these modules on build
stubModules: ['text'],
// Set common library paths
paths: {
jquery: 'empty:', // jquery is already loaded
underscore: 'libs/underscore',
backbone: 'libs/backbone'
// Define the application entry point
define('main', function (require) {
// Dependencies
var $ = require('jquery'),
router = require('router'); // This is the router.js file. Note, it gets invoked before DOM is loaded
// Auto go to a project detail page. Trigger = true will tell it to run the callback
// function from the router definition.
router.navigate("project/some-slug", {trigger:true})
// Start the application
define(function(require) {
// Dependencies
var $ = require('jquery'),
Backbone = require('backbone');
// Create router. We're assuming you aren't doing anything nuts, thus a single router
// for the whole site is suffient
var AppRouter = Backbone.Router.extend({
// Define routes
routes: {
"": "home",
"projects": "projects",
"project/:slug": "project",
// Handle those routes. These callbacks get called when navigate is called with
// trigger = true
project: function(slug) { },
projects: function() {},
home: function() {} // The home page
// Listen for history changes
pushState: true,
silent: true // This assumes that the server is handling the initial route and rendering your deep link
// Return the router for triggering links
return new AppRouter;
Copy link

Korenthin commented Jan 22, 2021

const Discord = require('discord.js'); const client = new Discord.Client(); //Toutes les actions à faire quand le bot se connecte client.on("ready", function () { console.log("Mon BOT est Connecté"); }) client.login("TOKEN DE VOTRE BOT");

Et voilà, vous pouvez maintenant commencer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment