smartel99

just a compact version

Jul 13th, 2018
1,798
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. import random
  2. import discord
  3. from discord import ChannelType
  4. from discord.ext import commands
  5. import smoll_methods
  6. import steam_account_value
  7. import github_thingy
  8.  
  9. bot = commands.Bot(command_prefix='do.', description='Here are all the command available at the moment')
  10.  
  11.  
  12. @bot.event
  13. async def on_ready():
  14. await bot.change_presence(game=discord.Game(name="do.help for help", type=1))
  15. print('Logged in as')
  16. print(bot.user.name)
  17. print(bot.user.id)
  18. print('---------')
  19.  
  20.  
  21. @bot.event
  22. async def on_member_join(member):
  23. await bot.send_message(destination=member,
  24. content="Welcome to/Bienvenue dans {}!".format(member.server.name))
  25. role = discord.utils.get(member.server.roles, name="Kohai")
  26. await bot.add_roles(member, role)
  27.  
  28.  
  29. @bot.command()
  30. async def add(left: int, right: int):
  31. """
  32. Name of command: add
  33. Description: adds two numbers together then gives the answer
  34. Parameters: two integers separated by spaces
  35. Exemple: `do.add 1 1` outputs `2`
  36. """
  37. await smoll_methods.add_number_together(bot, left, right)
Advertisement
Add Comment
Please, Sign In to add comment