Skip to content

Instantly share code, notes, and snippets.

@Snazzah
Created April 15, 2016 01:48
Show Gist options
  • Save Snazzah/4348dfb902ea6aba6a1dca0c1bd5a256 to your computer and use it in GitHub Desktop.
Save Snazzah/4348dfb902ea6aba6a1dca0c1bd5a256 to your computer and use it in GitHub Desktop.
Botboy's old code.
#Old code for BotBoy.
#Have fun getting your bot banned from all servers.
require 'discordrb'
bot = Discordrb::Commands::CommandBot.new(email: '',password: '',prefix: '^')
module PMJoin
extend Discordrb::EventContainer
pm do |event, *args|
inv = event.bot.invite(event.bot.resolve_invite_code(event.message.content))
event.bot.join(inv)
event.bot.send_message(167106306895773697,"User #{event.user.mention} (#{event.user.name}) PMed BotBoy to join #{inv.server.name} (#{event.message.content})")
event.bot.send_message(inv.server.id,"Hello! I am BotBoy! Made by **RIP**
My purpose isnt *official*, but you can use me to **invite other bots to this server**!
PS: This bot is not 24/7. It is ran straight from the developer's computer.
If you have any other questions, join this discord server: https://discord.gg/0vjTDaDsgOMlC5BB
To start, type `^help` in chat.
*Thanks!*")
event.user.pm("Joined **#{inv.server.name}**!")
end
end
bot.include! PMJoin
botchanmsg = "Hi! I'm Bot-chan and I was invited to this server by BotBoy.
You can use `]help` to see what I can do.
Mods can use `}help` for mod commands.
Mod/Admin commands including bot settings can be viewed with `}help`
For help / feedback / bugs/ testing / info / changelogs / etc. go to **https://discord.gg/0kvLlwb7slG3XCCQ**"
holobotmsg = "Heyo!~ My name is HoloBot! You can just call me Holo!~
I was invited to this server!~
If I'm supposed to be here, you can use `~help` to receive a list of my commands!~
Otherwise, feel free to kick me! But not too hard, I'm only fragile!~"
rh1nomsg = "Hello! I'm your friendly robo-Moderator and was invited by @BotBoy to make the lives of everyone easier!
If a Moderator with the `Manage Roles` permission would run the command `!!register`, I can start helping keep things clean!"
boobotmsg = "__**BooBot**__
*The most badass discord bot you can find*
__***There are way too many commands to list in a PM***__
For info about all commands:
1.) type `~commands` in a channel.
2.) visit <https://abal.moe/Discord/BooBot.html>
3.) Join my server and read #announcements
**>>> For questions, updates, beta-testing, and whatever else**
**>>> Join one of those (does not expire; all link to the same server)**
**>>>** https://discord.gg/0aMlLYi2e2X8a72q https://discord.gg/0aMlLYi2e2V7h2Kr https://discord.gg/0aMlLYi2e2VWOByn"
wildbotmsg = "Hey! I'm WildBot
I followed an instant-invite from someone.
If I'm intended to be here, use `++help` to see what I can do.
Else, use `++leave` or just kick me."
kanzemsg = "Default command-prefix is: `-kb`
The owner can reset it by calling `-kbreset`"
stahpmsg = "@BotBoy, I have accepted your invite!!
Hi, I just joined your server!
I am a bot designed to prevent people from advertising invites. I have a handful of features to help accomplish this. Say 'Help' here (PM StahpDozAds) to get a list of commands and information on how to best use me.
If you do not activate me, I will leave your server in 3 days. If you want to remove me now, simply run, from where this bot can see it in your server, 'leave'. If you want me to not accept invites to your server ever again, run 'leave-forever'. If you use 'leave-forever' I will only be able to come back if *you* DM me the invite. (Possibility of resummoning with BotBoy)
If you need assistance, you can find my Developer, Khio, in the Discord Bots Server
https://discord.gg/0cDvIgU2voWn4BaD"
floppymsg = ":floppy_disk: - help
:floppy_disk::information_source: - information about the bot, a user, or a channel
:floppy_disk::up: - uptime in minutes
:floppy_disk::8ball: - magic 8ball
:floppy_disk::game_die: - roll some dice
:floppy_disk::slot_machine: - slot machine "
ubermsg = "(Hi, I was invited by @BotBoy; .halp for info or kick me if unwanted! The kickass owner can use .admin to configure some stuff.)"
lewdmsg = "Joined by the invite of BotBoy. [Help: <http://notfab.net/LewdBot>]"
nodatamsg = "*no data could be found about this bot.*"
brownmsg = " `!help` for a full list of BrownBot's commands, if you'd like more info on a specific command you can use `!help ` "
nadekomsg = "You can use `-modules` command to see a list of all modules.
You can use `-commands ModuleName` (for example `-commands Administration`) to see a list of all of the commands in that module.
For a specific command help, use `-h 'Command name'` (for example `-h '!m q'`)
**LIST OF COMMANDS CAN BE FOUND ON THIS LINK**
<https://github.com/Kwoth/NadekoBot/blob/master/commandlist.md>"
deemsg = "Hello! My name is deeBot and I'm a Discord bot with multiple features.
I was invited by @BotBoy. if you don't want me here, simply issue the `!!leave` command.
In order to use my commands, you can get started by typing `!!help`.
If I am causing any issues, make sure to notify my author. *(ID: 98457903660269568)*"
mathmsg = "Beep boop. I'm a bot. I was invited to join this server by BotBoy. Send me a *private message* with `=help` for information on what I do."
bot.command :invite do |event, *args|
if event.user.id == 158049329150427136 then
inv = event.bot.invite(event.bot.resolve_invite_code(args[0]))
event.bot.join(inv)
"Joined **#{inv.server.name}**!"
else
event << ":no_entry: This command is not available! / If you want to invite BotBoy PM a invite."
end
end
bot.command :roles do |event|
if event.channel.private? then
event << ":no_entry: This command cannot be used in a PM!"
else
roless = event.server.roles
rolenum = 0
while not rolenum == roless.count do
roless[rolenum] = event.server.roles[rolenum].name
rolenum +=1
end
event << "__**All Roles in #{event.server.name}**__"
event << "```
#{roless.join('
')}```"
end
end
svrbl = [110374153562886144,166705905147052034]
usrbl = [0]
botdesc = ["To get help, use ``help`",botchanmsg,boobotmsg,stahpmsg,floppymsg,holobotmsg,wildbotmsg,rh1nomsg,kanzemsg,"Website: <https://github.com/Gravebot/Gravebot#commands>",ubermsg,lewdmsg,nodatamsg,"See `?help` for a complete list.",brownmsg,"Use `\help`",nodatamsg,nadekomsg,"Use `$help` for instructions.",deemsg,mathmsg]
botusrns = ["spoo.py","Bot-chan","BooBot","StahpDozAds",":floppy_disk:™","HoloBot","WildBot","RH1-NO","KanzeBot","GraveBot","UB3R-B0T","LewdBot","Almighty Bot","R. Danny","BrownBot","Discoid","Disgord","NadekoBot","STER_BOT","deeBot","MathBot"]
botusrs = ["spoo.py","bot-chan","boobot","stahpdozads","floppy","holobot","wildbot","rh1-no","kanzebot","gravebot","ub3r-b0t","lewdbot","almightybot","rdanny","brownbot","discoid","disgord","nadekobot","ster_bot","deebot","mathbot"]
botids = [109379894718234624,125367104336691200,104867073343127552,152037375890030592,159133099806949376,138305393204920329,110462073074388992,135288293548883969,122799778491793411,81026656365453312,85614143951892480,119482224713269248,113276551147053056,80528701850124288,112989540821528576,114524207836037123,151018674793349121,116275390695079945,109264024943763456,137904252214444032,134073775925886976]
bot.command :getbot do |event, *args|
if event.channel.private? then
event << ":no_entry: This command cannot be used in a PM!"
else
if event.user.id == 158049329150427136 or event.user == event.server.owner then
if svrbl.include?(event.server.id) then
":no_entry: This server is in the blacklist!"
else
if usrbl.include?(event.server.owner.id) then
":no_entry: The server owner is in the blacklist!"
else
inv = event.channel.make_invite()
indexnum = botusrs.index(args.join(' ').downcase)
selbot = bot.user(botids[indexnum])
if not selbot == nil then
selbot.pm("https://discord.gg/" + "#{inv.code}")
"#{event.user.mention} told **#{botusrns[indexnum]}** to join server **#{inv.server.name}**! PMing instructions..."
event.user.pm("__***Instuctions from #{botusrns[indexnum]}***__
#{botdesc[indexnum]}")
bot.send_message(167106306895773697,"User #{event.user.mention} (#{event.user.name}) added bot #{botusrns[indexnum]} to join server #{event.server.name} (<https://discord.gg/#{inv.code}>)")
selbot.add_role(event.server, bot.bot_user.roles[event.server.id][0])
else
"No bot was found by the name of **#{args.join(' ')}**."
end
end
end
else
event << ":no_entry: This command is only for the server owner!"
end
end
end
bot.command :getbotinfo do |event, *args|
indexnum = botusrs.index(args.join(' ').downcase)
selbot = bot.user(botids[indexnum])
if not selbot == nil then
event.user.pm("__***Instuctions from #{botusrns[indexnum]}***__
#{botdesc[indexnum]}")
"Sent **#{botusrns[indexnum]}** instructions to #{event.user.mention}!"
else
"No bot was found by the name of **#{args.join(' ')}**."
end
end
bot.command :kickbot do |event, *args|
if event.user.id == 158049329150427136 or event.user == event.server.owner then
indexnum = botusrs.index(args.join(' ').downcase)
selbot = bot.user(botids[indexnum])
if not selbot == nil then
event.server.kick(selbot)
"#{event.user.mention} has kicked bot #{botusrns[indexnum]}."
else
"No bot was found by the name of **#{args.join(' ')}**."
end
else
event << ":no_entry: This command is only for the server owner!"
end
end
bot.command :botlist do |event|
n = 0
str = []
while n <= botids.count do
str[n] = "#{botusrs[n]} | #{botusrns[n]} | #{botids[n]}"
n += 1
end
event << "#{event.user.mention}"
event << "__**Available Bots**__"
event << "```"
event << "calling word | real bot name | id"
event << "--------------------------"
event << "#{str.join("
")}"
event << "```"
event << "**#{botids.count} bots in total.**"
end
bot.command :help do |event|
event << "I sent you a list, #{event.user.mention} !"
event.user.pm("__**Available Commands**__
**^botlist** *~ Gets a full list of bots that you can invite.*
**^invite** (invite link) *~ Invites bot to server with invite.*
**^roles** *~ Prints all roles from the server.*
__***Commands only available to Server Owner***__
**^getbot (calling word)** (invite)** *~ Gets (name) of bot and gives them (invite) in a PM.*
**^getbotinfo (calling word)** *~ Gets bot welcome message PM'ed to you.*
(*wont ever work*) **^kickbot (calling word)** *~ Kicks bot that is in your server.*
If you have any questions, join this discord server: https://discord.gg/0vjTDaDsgOMlC5BB")
end
bot.run :async
bot.game=("with other Bots")
bot.send_message(167106306895773697,"Rebooted!")
bot.sync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment