add tasks module and allow gspread config
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
from discord.ext import commands
|
from discord.ext import commands, tasks
|
||||||
import logging
|
import logging
|
||||||
from jeevesbot import bothelp, functions, env
|
from jeevesbot import bothelp, functions, env
|
||||||
import gspread
|
import gspread
|
||||||
@@ -20,8 +20,8 @@ client = discord.Client()
|
|||||||
e = discord.Embed()
|
e = discord.Embed()
|
||||||
# setup gspread
|
# setup gspread
|
||||||
scope = ['https://www.googleapis.com/auth/spreadsheets', 'https://www.googleapis.com/auth/drive']
|
scope = ['https://www.googleapis.com/auth/spreadsheets', 'https://www.googleapis.com/auth/drive']
|
||||||
# creds = ServiceAccountCredentials.from_json_keyfile_name('jeevesbot/secret.json', scope)
|
creds = ServiceAccountCredentials.from_json_keyfile_name('jeevesbot/secret.json', scope)
|
||||||
# gclient = gspread.authorize(creds)
|
gclient = gspread.authorize(creds)
|
||||||
|
|
||||||
@client.event
|
@client.event
|
||||||
async def on_message(message):
|
async def on_message(message):
|
||||||
@@ -86,6 +86,7 @@ async def on_ready():
|
|||||||
print('### Active with id %s as %s ###' % (client.user.id,client.user.name) )
|
print('### Active with id %s as %s ###' % (client.user.id,client.user.name) )
|
||||||
activity = discord.Activity(name='!help', type=discord.ActivityType.listening)
|
activity = discord.Activity(name='!help', type=discord.ActivityType.listening)
|
||||||
await client.change_presence(activity=activity)
|
await client.change_presence(activity=activity)
|
||||||
|
looptest.start()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
client.run(env.TOKEN)
|
client.run(env.TOKEN)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
aiohttp
|
aiohttp
|
||||||
async-timeout
|
async-timeout
|
||||||
dice
|
dice
|
||||||
discord.py
|
discord.py[voice]
|
||||||
docopt
|
docopt
|
||||||
multidict
|
multidict
|
||||||
pyparsing
|
pyparsing
|
||||||
|
|||||||
Reference in New Issue
Block a user