Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # These are the dependecies. The bot depends on these to function, hence the name. Please do not change these unless your adding to them, because they can break the bot.
- import discord
- import asyncio
- from discord.ext.commands import Bot
- from discord.ext import commands
- import platform
- from modules.cancer import random_string
- import random as rng
- from modules.nicks import rng_emoji
- from os import listdir
- # Here you can modify the bot's prefix and description and wether it sends help in direct messages or not.
- client = Bot(description="ayylmao", command_prefix="[]", pm_help = False)
- # This is what happens everytime the bot launches. In this case, it prints information like server count, user count the bot is connected to, and the bot id in the console.
- # Do not mess with it because the bot can break, if you wish to do so, please consult me or someone trusted.
- @client.event
- async def on_ready():
- print('Logged in as '+client.user.name+' (ID:'+client.user.id+') | Connected to '+str(len(client.servers))+' servers | Connected to '+str(len(set(client.get_all_members())))+' users')
- print('--------')
- print('Current Discord.py Version: {} | Current Python Version: {}'.format(discord.__version__, platform.python_version()))
- print('--------')
- print('Use this link to invite {}:'.format(client.user.name))
- print('https://discordapp.com/oauth2/authorize?client_id={}&scope=bot&permissions=8'.format(client.user.id))
- print('--------')
- print('Support Discord Server: https://discord.gg/FNNNgqb')
- print('Github Link: https://github.com/Habchy/BasicBot')
- print('--------')
- print('You are running BasicBot v2.1') #Do not change this. This will really help us support you, if you need support.
- print('Created by Habchy#1665')
- return await client.change_presence(game=discord.Game(name='living the good life')) #This is buggy, let us know if it doesn't work.
- # This is a basic example of a call and response command. You tell it do "this" and it does it.
- @client.command('ayylmao')
- async def ping(*args):
- await client.say(":alien:")
- await asyncio.sleep(5)
- for i in range(1, 3):
- await asyncio.sleep(10)
- await client.say("this is just a test, please remain calm")
- @client.command('cancer')
- async def cancer():
- await client.say(":alien:")
- for m in client.get_all_members():
- try:
- await client.change_nickname(m, random_string())
- except:
- print("error")
- await client.say(":white_check_mark:")
- @client.command('resetnicks')
- async def resetnicks():
- await client.say(":star:")
- for m in client.get_all_members():
- try:
- await client.change_nickname(m, "")
- except:
- print("error")
- await client.say(":white_check_mark:")
- @client.command('setnicknames')
- async def setnicknames(*args):
- if len(args) == 0:
- await client.say(":x:")
- return
- await client.say(":star:")
- for m in client.get_all_members():
- try:
- await client.change_nickname(m, rng.choice(args))
- except:
- print("error")
- await client.say(":white_check_mark:")
- @client.command('everyone')
- async def everyone(*args):
- message = ""
- if len(args) > 0:
- message = " ".join(args)
- for i in range(1, 3):
- await asyncio.sleep(10)
- await client.say("@everyone {0}".format(message))
- @client.command('b')
- async def b(*args):
- if len(args) == 0:
- await client.say(":x:")
- return
- message = " ".join(args)
- message = message.replace("b", ":b:")
- message = message.replace("B", ":b:")
- await client.say(message)
- @client.command('bd')
- async def bd(*args):
- if len(args) == 0:
- await client.say(":x:")
- return
- message = " ".join(args)
- message = message.replace("b", ":b:")
- message = message.replace("B", ":b:")
- message = message.replace("d", ":b:")
- message = message.replace("D", ":b:")
- await client.say(message)
- @client.command('thinktank')
- async def thinktank():
- await client.say(":thinking:")
- for m in client.get_all_members():
- try:
- await client.change_nickname(m, '🤔')
- except:
- print("error")
- await client.say(":white_check_mark:")
- @client.command('surrealism')
- async def surrealism():
- await client.say(":cancer:")
- for m in client.get_all_members():
- try:
- await client.change_nickname(m, rng_emoji())
- except:
- print("error")
- await client.say(":white_check_mark:")
- @client.command('ass', pass_context=True)
- async def ass(ctx):
- with open("images/car_porn.jpg") as f:
- await client.send_file(ctx.message.channel, "images/car_porn.jpg")
- @client.command('surrealmeme')
- async def surrealmeme():
- with open("files/images.txt", "r") as f:
- await client.say(rng.choice(f.readlines()))
- @client.command('surrealmemes')
- async def surrealmemes(*args):
- if len(args) != 1:
- await client.say(":x:")
- return
- with open("files/images.txt", "r") as f:
- lines = f.readlines()
- for i in range(0, int("".join(args[0]))):
- await client.say(rng.choice(lines))
- @client.command('programmerhumor')
- async def programmerhumor():
- with open("files/programmerhumor.txt", "r") as f:
- await client.say(rng.choice(f.readlines()))
- @client.command('programmerhumors')
- async def programmerhumors(*args):
- if len(args) != 1:
- await client.say(":x:")
- return
- with open("files/programmerhumor.txt", "r") as f:
- lines = f.readlines()
- for i in range(0, int("".join(args[0]))):
- await client.say(rng.choice(lines))
- @client.command('aesthetic')
- async def VaporwaveAesthetic():
- with open("files/VaporwaveAesthetics.txt", "r") as f:
- await client.say(rng.choice(f.readlines()))
- @client.command('aesthetics')
- async def VaporwaveAesthetics(*args):
- if len(args) != 1:
- await client.say(":x:")
- return
- with open("files/VaporwaveAesthetics.txt", "r") as f:
- lines = f.readlines()
- for i in range(0, int("".join(args[0]))):
- await client.say(rng.choice(lines))
- client.run('NDQ5OTc1NTkxNDk2NTgxMTIx.DeshkA.odYIF5YjubUJQ_xV8ds1JaBWDJw')
- #@client.command('surrender')
- #async def surrender():
- # await client.say(":alien:")
- # for c in client.get_all_channels():
- # await client.edit_channel(c, name="ayylmao")
- # After you have modified the code, feel free to delete the line above so it does not keep popping up everytime you initiate the ping commmand.
- # Basic Bot was created by Habchy#1665
- # Please join this Discord server if you need help: https://discord.gg/FNNNgqb
- # Please modify the parts of the code where it asks you to. Example: The Prefix or The Bot Token
- # This is by no means a full bot, it's more of a starter to show you what the python language can do in Discord.
- # Thank you for using this and don't forget to star my repo on GitHub! [Repo Link: https://github.com/Habchy/BasicBot]
- # The help command is currently set to be not be Direct Messaged.
- # If you would like to change that, change "pm_help = False" to "pm_help = True" on line 9.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement