Skip to content

Vandmus discord bot javascript source code. Made for personal use but i will save it here.

Notifications You must be signed in to change notification settings

donwiktorb/Discord-Bot-JS

Repository files navigation

Vandmus discord bot js source code 👋

This was some type of speedrun so putting it on github for people that would like to check how to made something for example music.

Need help or something?

➡️ Join discord here

Links

BOT SETUP

  • Next you have to setup discord.js bot, download and install Node js

  • If you are using linux then you should follow these steps:

  • Nodejs

  • Installing bot

    • Create bot on Discord Dev by creating new application (copy client id and save it for later) and clicking add bot, then copy the token
    • Edit data/config.js token with bot token
    • also edit commands/admin.js line 50 with your discord id if you want bladd command to work
    • Put all files in some directory ex. /home/bot/ then execute these in console like cmd or something
       cd BOT DIRECTORY /home/bot/ OR cd D:\bot for example.
       npm install
       node .
    
  • How to make music working

    • Click here and generate a key for youtube api
    • Then change the line 43, 54, 60 with your youtube api key and you are done.

Next

  • Do what you want with it .

  • Adding command example.

Commands.Add('test', async (msg, args) => {
    msg.reply("test");
});
  • Adding function example.
Functions.Add('test', async (msg) => {
    return 'hi';
});
  • Calling function
Commands.Add('test', async (msg, args) => {
    let test = await Functions.Execute('test', msg);
    msg.reply(test);
});
  • Create threads
Functions.CreateThread(48, async () => {
    // Request example
    let data = await Functions.Execute('createRequest', 'http://localhost:30120/players.json');
    if (!data)
        return client.user.setActivity("OFF")
    client.user.setActivity(`WL-OFF: ${data.length}`, { type: 'WATCHING' })
});

About

Vandmus discord bot javascript source code. Made for personal use but i will save it here.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published