Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import discord
- import os
- from discord.ext import commands, tasks
- from itertools import cycle
- client = commands.Bot(command_prefix = 'c#')
- status = cycle(['Visual Studio', 'Random stuff', 'Tablist lmao', 'Minecraft', 'do c#help for help'])
- @client.command()
- async def load(ctx, extension):
- client.load_extension(f'cogs.{extension}')
- @client.command()
- async def unload(ctx, extension):
- client.unload_extension(f'cogs.{extension}')
- for filename in os.listdir('./cogs'):
- if filename.endswith('.py'):
- client.load_extension(f'cogs.{filename[:-3]}')
- @client.event
- async def on_ready():
- change_status.start()
- print('Bot Ready!')
- @client.command()
- async def kick(ctx, member : discord.Member, *, reason=None):
- await member.kick(reason=reason)
- print('member was kicked')
- await ctx.send(f'kicked {user.mention}')
- @client.command()
- async def ban(ctx, member : discord.Member, *, reason=None):
- await member.ban(reason=reason)
- print('member was banned')
- await ctx.send(f'banned {user.mention}')
- @client.command()
- async def unban(ctx, *, member):
- banned.users = await ctx.guild.bans()
- member_name, member_discriminator = member.split('#')
- for ban_entry in banned_users:
- user = ban_entry.user
- if (user.name, user.discriminator) == (member_name, member_discriminator):
- await ctx.guild.unban(user)
- await ctx.send(f'Unbanned {user.mention}')
- return
- @client.event
- async def on_member_join(member):
- print(f'{member} has joined {member.guild.name}.')
- # Commands
- @client.command()
- async def donate(ctx):
- print('link sent')
- await ctx.send(" Have to fix. i was an idiot lmao ")
- @client.command()
- async def clean(ctx, amount=1):
- print('Cleaning Chat')
- await ctx.channel.purge(limit=amount)
- print('Done!')
- @client.command()
- async def link(ctx):
- await ctx.send("here!")
- await ctx.send("https://discordapp.com/api/oauth2/authorize?client_id=586259055652372492&permissions=8&scope=bot")
- @client.command()
- async def develop(ctx):
- print ('Fuck.. they know my secrets! ABORT ABORT!')
- await ctx.send("I use visual studio community to code my bots! So does JakubPlaus.")
- await ctx.send("he told me that i sould make my own bot.")
- await ctx.send("JakubPlaus: i use vs code as faster load, i use vs community for bigger projects")
- await ctx.send("Codys Development")
- @tasks.loop(seconds=5)
- async def change_status():
- await client.change_presence(activity=discord.Game(next(status))
- client.run('NoPe')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement