Move Google keys to bot_secrets.json
This commit is contained in:
parent
65b3bb39e3
commit
5bc5eaefd1
@ -128,7 +128,7 @@ class Rcon:
|
||||
@commands.command()
|
||||
@commands.guild_only()
|
||||
async def monitor_chat(self, ctx, *, server=None):
|
||||
'''Begins monitoring the specified ARK server for chat messages and other events.
|
||||
"""Begins monitoring the specified ARK server for chat messages and other events.
|
||||
The specified server must already be in the current guild\'s configuration.
|
||||
To add and remove ARK servers from the guild see add_rcon_server and remove_rcon_server.
|
||||
The server argument is not case sensitive and if the server name has two
|
||||
@ -136,7 +136,7 @@ class Rcon:
|
||||
first last
|
||||
first_last
|
||||
"first last"
|
||||
To view all the valid ARK servers for this guild see list_ark_servers.'''
|
||||
To view all the valid ARK servers for this guild see list_ark_servers."""
|
||||
if checks.is_rcon_admin(self.bot, ctx):
|
||||
if server is not None:
|
||||
rcon_connections = json.loads(self.bot.con.one('select rcon_connections from guild_config\
|
||||
|
||||
@ -499,7 +499,7 @@ class Utils:
|
||||
|
||||
@commands.command(name='google', aliases=['g', 'search'])
|
||||
async def google_search(self, ctx, *, search):
|
||||
res = self.bot.gcs_service.cse().list(q=search, cx='012214819999548252842:tarnolfyw44').execute()
|
||||
res = self.bot.gcs_service.cse().list(q=search, cx=self.bot.bot_secret['cx']).execute()
|
||||
results = res['items'][:4]
|
||||
em = discord.Embed()
|
||||
em.title = f'Google Search'
|
||||
@ -516,7 +516,7 @@ class Utils:
|
||||
'https://www.googleapis.com/auth/drive']
|
||||
credentials = ServiceAccountCredentials.from_json_keyfile_name('config/google_client_secret.json', scope)
|
||||
gc = gspread.authorize(credentials)
|
||||
sh = gc.open_by_key('128GnQPOx0u7oPGvu5nAJks_Qv2R0Ru9ILAniICoxhJ8')
|
||||
sh = gc.open_by_key(self.bot.bot_secret['sheet'])
|
||||
ws = sh.worksheet('Current Whitelist')
|
||||
names = ws.col_values('3')
|
||||
steam = ws.col_values('6')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user