Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.92 KB | None | 0 0
  1. import discord
  2. from discord.ext import commands
  3. import json
  4. import asyncio
  5. client = discord.Client()
  6. token = 'n0-t0k3n-f0r-u'
  7. # Set's bot's desciption and prefixes in a list
  8. description = "A self bot to do things that are useful"
  9. bot = commands.Bot(command_prefix=['`'], description=description, self_bot=True)
  10.  
  11. ###################
  12. ## Startup Stuff ##
  13. ###################
  14.  
  15. @bot.event
  16. async def on_ready():
  17.     # Outputs login data to console
  18.     print("---------------------------")
  19.     print('Logged in as')
  20.     print(bot.user.name)
  21.     print(bot.user.id)
  22.     print("---------------------------")
  23.  
  24.     # Outputs the state of loading the modules to the console
  25.     # So I know they have loaded correctly
  26.     print("Loading Modules")
  27.     print("---------------------------")
  28.     bot.load_extension("modules.misc")
  29.     print("Loaded Misc")
  30.     bot.load_extension("modules.moderation")
  31.     print("Loaded Moderation")
  32.     bot.load_extension("modules.rng")
  33.     print("loaded RNG")
  34.     print("---------------------------")
  35.  
  36. ######################
  37. ## Misc and Testing ##
  38. ######################
  39.  
  40. # Ping Pong
  41. # Testing the response of the bot
  42. @bot.command(pass_context=True,hidden=True)
  43. async def ping(ctx):
  44.     """Pong"""
  45.     await bot.say("Pong")
  46.     print("Ping Pong")
  47.  
  48. # Invite link to the bot server
  49. @bot.command()
  50. async def server():
  51.     """The bot's server, for updates or something"""
  52.     await bot.say("https://discord.gg/Eau7uhf")
  53.     print("Run: Server")
  54.  
  55. # Bot's source code
  56. @bot.command()
  57. async def source():
  58.     """Source code"""
  59.     await bot.say("https://github.com/DiNitride/GAFBot")
  60.     print("Run: Source")
  61.  
  62. @bot.command()
  63. async def gaf_server():
  64.     """GAF Server Invite Link"""
  65.  
  66. ##############################
  67. ## FANCY TOKEN LOGIN STUFFS ##
  68. ##############################
  69.  
  70. #with open("self_token.txt") as token:
  71. #    bot.run(token.read(), bot=False)
  72. client.run(token, bot=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement