Move Google keys to bot_secrets.json
This commit is contained in:
parent
5bc5eaefd1
commit
927275d5b3
@ -499,7 +499,7 @@ class Utils:
|
|||||||
|
|
||||||
@commands.command(name='google', aliases=['g', 'search'])
|
@commands.command(name='google', aliases=['g', 'search'])
|
||||||
async def google_search(self, ctx, *, search):
|
async def google_search(self, ctx, *, search):
|
||||||
res = self.bot.gcs_service.cse().list(q=search, cx=self.bot.bot_secret['cx']).execute()
|
res = self.bot.gcs_service.cse().list(q=search, cx=self.bot.bot_secrets['cx']).execute()
|
||||||
results = res['items'][:4]
|
results = res['items'][:4]
|
||||||
em = discord.Embed()
|
em = discord.Embed()
|
||||||
em.title = f'Google Search'
|
em.title = f'Google Search'
|
||||||
@ -516,7 +516,7 @@ class Utils:
|
|||||||
'https://www.googleapis.com/auth/drive']
|
'https://www.googleapis.com/auth/drive']
|
||||||
credentials = ServiceAccountCredentials.from_json_keyfile_name('config/google_client_secret.json', scope)
|
credentials = ServiceAccountCredentials.from_json_keyfile_name('config/google_client_secret.json', scope)
|
||||||
gc = gspread.authorize(credentials)
|
gc = gspread.authorize(credentials)
|
||||||
sh = gc.open_by_key(self.bot.bot_secret['sheet'])
|
sh = gc.open_by_key(self.bot.bot_secrets['sheet'])
|
||||||
ws = sh.worksheet('Current Whitelist')
|
ws = sh.worksheet('Current Whitelist')
|
||||||
names = ws.col_values('3')
|
names = ws.col_values('3')
|
||||||
steam = ws.col_values('6')
|
steam = ws.col_values('6')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user