Browse Source

Extra todo and a space that annoys me on the live message.

tags/v0.3.3
roxie 7 years ago
parent
commit
fbd74a6f49
1 changed files with 13 additions and 1 deletions
  1. +13
    -1
      main.py

+ 13
- 1
main.py View File

# TODO: Overwatch stats - Using Overwatch-API lib # TODO: Overwatch stats - Using Overwatch-API lib
# TODO: Move away from using ID's for everthing. Maybe replace list with dict # TODO: Move away from using ID's for everthing. Maybe replace list with dict
# TODO: Add check for no channel id when a module is enabled # TODO: Add check for no channel id when a module is enabled
# TODO: Formatting, both the code and the messages send. Add more rich embeds




import json import json
@bot.event @bot.event
async def on_member_update(member_b, member_a): async def on_member_update(member_b, member_a):
# Twitch Shilling Part # Twitch Shilling Part

if blacklisted(member_b): if blacklisted(member_b):
return return


if member_a.game: if member_a.game:
if member_a.game.type: if member_a.game.type:
channel = discord.Object(config[member_a.server.id]["twitch_shilling"]["twitch-channel"]) channel = discord.Object(config[member_a.server.id]["twitch_shilling"]["twitch-channel"])
return await bot.send_message(channel, content=":video_game:** {} is live!** :video_game:\n {}\n{}".format(member_a.name, member_a.game.name, member_a.game.url))
return await bot.send_message(channel,
content=":video_game:** {} is live!** :video_game:\n{}\n{}".format(
member_a.name, member_a.game.name, member_a.game.url))




@bot.event @bot.event
return await bot.say(roles) return await bot.say(roles)




@bot.command()
async def embed():
embed = discord.Embed(title="sdfsdfsdf", video={"url": "https://www.youtube.com/watch?v=N4FlL1FCbvA"},
color=0x46e1ff)
return await bot.say(embed=embed)


################# #################
# Owner Commands# # Owner Commands#
################# #################


if __name__ == "__main__": if __name__ == "__main__":
config = load_config() config = load_config()

bot.run(token) bot.run(token)

Loading…
Cancel
Save