Change all email/password pair examples to use token.
This commit is contained in:
@ -23,7 +23,7 @@ loop = asyncio.get_event_loop()
|
||||
|
||||
try:
|
||||
loop.create_task(my_background_task())
|
||||
loop.run_until_complete(client.login('email', 'password'))
|
||||
loop.run_until_complete(client.login('token'))
|
||||
loop.run_until_complete(client.connect())
|
||||
except Exception:
|
||||
loop.run_until_complete(client.close())
|
||||
|
@ -62,4 +62,4 @@ async def _bot():
|
||||
"""Is the bot cool?"""
|
||||
await bot.say('Yes, the bot is cool.')
|
||||
|
||||
bot.run('email', 'password')
|
||||
bot.run('token')
|
||||
|
@ -19,4 +19,4 @@ async def on_message_delete(message):
|
||||
fmt = '{0.author.name} has deleted the message:\n{0.content}'
|
||||
await client.send_message(message.channel, fmt.format(message))
|
||||
|
||||
client.run('email', 'password')
|
||||
client.run('token')
|
||||
|
@ -21,4 +21,4 @@ async def on_message_edit(before, after):
|
||||
fmt = '**{0.author}** edited their message:\n{1.content}'
|
||||
await client.send_message(after.channel, fmt.format(after, before))
|
||||
|
||||
client.run('email', 'password')
|
||||
client.run('token')
|
||||
|
@ -34,4 +34,4 @@ async def on_ready():
|
||||
print(client.user.id)
|
||||
print('------')
|
||||
|
||||
client.run('email', 'password')
|
||||
client.run('token')
|
||||
|
@ -15,4 +15,4 @@ async def on_ready():
|
||||
print(client.user.id)
|
||||
print('------')
|
||||
|
||||
client.run('email', 'password')
|
||||
client.run('token')
|
||||
|
@ -100,4 +100,4 @@ class Bot(discord.Client):
|
||||
|
||||
|
||||
bot = Bot()
|
||||
bot.run('email', 'password')
|
||||
bot.run('token')
|
||||
|
@ -19,4 +19,4 @@ async def on_ready():
|
||||
print(client.user.id)
|
||||
print('------')
|
||||
|
||||
client.run('email', 'password')
|
||||
client.run('token')
|
||||
|
Reference in New Issue
Block a user