SwagBot

cropped-swagbotlogo.pngSwagBot is a multipurpose Discord bot written in Kotlin and Java with support for playing music from YouTube, SoundCloud, and direct streaming. It also has some basic moderation, an NSFW filter, and some fun commands.

Check out SwagBot’s development on GitHub:

https://github.com/Masterzach32/SwagBot

Add SwagBot to your server here:

https://bots.discord.pw/bots/217065780078968833

Join SwagBot Hub on discord:

If you find a bug in the bot, please create a new issue on GitHub.

If you want to help SwagBot’s development, please donate to my PayPal: https://paypal.me/ultimatedoge

You can also help by checking out my Patreon page: https://patreon.com/ultimatedoge

Introduction

Commands Documentation

Most of SwagBot’s commands are documented here. One important thing to note about the documentation is the syntax in which they are documented. When command syntax is displayed, it will use a specific format. The format is ~command <required arg> [optional arg]. Arguments are placed in angle brackets, like < and >, to designate that the argument is required. Likewise, arguments are placed in square brackets, like [ and ] to designate that the argument is not required. Occasionally, the pipe character, |, may be used to designate multiple accepted argument types or separate parameters that may use spaces.

Permissions

One of the most common questions asked about SwagBot is how the permission system works. The bot has 4 permission levels:

NONE

NORMAL

MOD

ADMIN

These permissions can be assigned by typing ~permission or ~perm, followed by the permission (MOD for example) and then a list of mentioned users to assign it to. The server owner is automatically assigned ADMIN.

ex. ~perm MOD @example#0000

Additionally, some commands (particularly moderation commands) require the user running the command to explicitly have the permission required. For example, even if someone has the MOD permission, they would still need the Discord BAN_MEMBERS permission in order to ban users. This allows the permissions system to be more customizable.

Command Reference

Music Commands

Command Description Example Permission Level Aliases
~play <gsearch|url> Queue audio to be played in the sender's voice channel. If a url is specified, the url will be played (if it is supported). If a url is not specified, SwagBot will search YouTube for a song matching the search to play. Currently supported audio sources are YouTube, SoundCloud, and raw .mp3, .wav, and .ogg files. ~play wherever i go one republic NORMAL p
~playlist <action> <name> [link|param] Interface with the bots expansive playlist system. Import youtube playlists, or create your own playlists by adding links one by one. Actions: create, import, add, remove, delete, queue, list, info ~playlist create Rock
~playlist add Rock <youtube|soundcloud link> ~playlist queue Rock
NORMAL plist
~replay Requeues the currently playing song ~replay NORMAL
~reload Reloads the bot for your guild, which should fix any audio issues. ~reload MOD
~clear Clears the bot's music queue and stops the current song. ~clear MOD
~skip Vote to skip the current song. ~skip NORMAL
~shuffle Shuffles the queue ~shuffle NORMAL
~pause Pauses the current song. ~pause NORMAL
~resume Resumes playback. ~resume NORMAL
~queue [page] View the song queue. If their are more than 15 songs queued, you will have to view multiple queue pages. ~queue 2 NORMAL
~volume [int 0-100] Set the volume to a number between 0 and 100, and tells you the current volume if you don't supply and integer. ~volume 50 NORMAL
~tannounce [true/false] Toggle whether the bot messages users when their track starts playing. ~tannounce false ADMIN
~cns [true/false] Toggle whether the bot changes its nickname based on the currently playing song. ~cns true ADMIN

Moderation Commands

Command Description Example Permission Level Aliases
~game <command> [args] Move users between voice channels based on the game they are playing! Enable, set the default channel, and add game/channel pairs. ~game enable
~game set-def-channel
~game add Overwatch | The Lounge
ADMIN
~ban <user> Ban a user from this server. Use @mention to ban the user. ~ban @example#0000 MOD
~softban <user> Bans a user from the server, then pardons them, deleting their message history. Useful for removing spam from a user. ~softban @example#0000 MOD
~kick <user> Kicks a user from this server. ~kick @example#0000 MOD
~pardon <user> Removes a user's ban. ~pardon @example#0000 MOD
~prune <int 2-100> [user] Prune the specified amount of messages. If a user is specified, prune only that user's messages. ~prune @example#0000 MOD purge
~lock Locks the bot, so no music can be queued, the bot cannot be moved to a different channel (unless physically moved), and skipping is disabled. ~lock MOD l
~changeprefix <char> Changes the default command prefix, which is ~. Must be a single character. ~cp ! ADMIN cp
~migrate [from channel] [to channel] Moves everyone from one voice channel to another. If no parameters are supplied, the bot will move everyone from its current voice channel to the channel you are currently in. ~migrate The Lounge The Park MOD move, m, populate
~bring Moves all users currently connected to a voice channel to the channel you are currently in. ~bring MOD here
~disconnect <user> Mention a user to disconnect them from the voice channel they are currently connected to. ~disconnect @example#0000 MOD
~unafk Move everyone currently in the server's AFK channel to the channel you are currently connected to. ~unafk MOD
~massafk Move everyone connected to a voice channel in the server to the AFK channel. ~mafk MOD mafk
~nsfw Enable/Disable the NWFW filter (beta) ~nsfw ADMIN

Fun Commands

Command Description Example Permission Level Aliases
~swag Sweg ~swag NORMAL
~exchange [from] [to] [amount] Convert from one currency to another. ~exchange USD ASD 10 NORMAL
~shorten <url> Shorten the provided URL to a goo.gl link. ~shorten http://masterzach32.net/ NORMAL
~dice [int] Rolls a dice and returns a random number between 1 and [int] (default 6) ~dice 8 NORMAL roll
~quote Puts a random quote in chat. ~quote NORMAL
~8ball Ask your favorite childhood toy anything! ~8ball will i win the lottery? NORMAL 8
~joke Puts a random joke in chat. ~joke NORMAL
~choose <option 1> | <option 2> [| option 3] Choose between at least 2 strings, separated by | ~choose League of Legends | Overwatch | Physics Homework NORMAL
~cat Puts a random cat picture in the chat. ~cat NORMAL
~define <term> Looks up a term on Urban Dictionary ~define talon NORMAL
~fight <list of users> Have some users in your server fight! You can mention @everyone, @role, or specific people. There must be at least 2 users in a fight. WARNING: may induce salt. ~fight @example1#0000 @example2#0000 NORMAL
~lmgtfy <search query> Puts a lmgtfy link in the chat based on your search. ~lmgtfy was that so hard? NORMAL google
~stackoverflow <search query> Search StackOverflow for your specified issue. ~stackoverflow creating a discord bot java NORMAL
~strawpoll <question> | <choice 1> | <choice 2> [| choice 3] Create a poll on StrawPoll. Needs a question and at least 2 poll options, and cannot have more than 30. ~strawpoll Movie Night! | Pitch Perfect 2 | Captain America Civil War NORMAL spoll
~osu <username> Get stats on an osu! user given their username. ~osu Name NORMAL
  • Muhammad Fadzli Zulkipli

    how can i set it so that no need to vote to skip a song?

  • Lucas

    Why does the bot keep skipping in the middle of songs

  • gog5

    nice bot but can I host it myself ?

  • Duradoh

    So im having the bot for a day now and have done a playlist but the problem is the bot automaticly skips the song in the middle of the song. Is there a way to fix that or is that a bug?

  • TheTurningCurve

    Working great so far! Thanks for the jams

  • Prankish

    We keep adding music to the queue but nothing gets played. Not sure if it a permissions issue but the bot never enters the channel.
    There are 2 song(s) in queue.
    Currently Playing: Halloween Theme [Michael Myers] (Prankish)
    (1) – Halloween Theme [Michael Myers] (Prankish)
    (2) – Halloween Theme [Michael Myers] (Limelime)

    • Masterzach32

      You can type ~summon to bring the bot to your channel. Joining when using ~play is broken right now, and I am working on a fix

  • Queenie

    Why is the bot so laggy?

    • Masterzach32

      Running it off of an older computer right now, but I am building a server to run it off of in the near future.