Post to bot channel when starting

dev
pocketjawa 2017-02-21 05:21:00 +00:00
parent 3633581b61
commit e678c9e1e3
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@ config = configparser.ConfigParser()
config.read("/srv/discord-pocketbot/config.cfg") config.read("/srv/discord-pocketbot/config.cfg")
token = config.get("configuration", "token") token = config.get("configuration", "token")
bot_channel_id = discord.Object(id=config.get("configuration", "bot_channel_id"))
client = discord.Client() client = discord.Client()
@ -18,6 +19,7 @@ def on_ready():
print(client.user.name) print(client.user.name)
print(client.user.id) print(client.user.id)
print('------') print('------')
yield from client.send_message(bot_channel_id, "This isn't Tatooine...")
@client.event @client.event
@asyncio.coroutine @asyncio.coroutine