From 5bc5eaefd1264726d2db73566e4327f910243a81 Mon Sep 17 00:00:00 2001 From: "Dusty.P" Date: Sun, 15 Apr 2018 00:02:55 -0800 Subject: [PATCH] Move Google keys to bot_secrets.json --- exts/rcon.py | 4 ++-- exts/utils.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exts/rcon.py b/exts/rcon.py index 1ceaa19..f254733 100644 --- a/exts/rcon.py +++ b/exts/rcon.py @@ -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\ diff --git a/exts/utils.py b/exts/utils.py index d3df557..df3903c 100644 --- a/exts/utils.py +++ b/exts/utils.py @@ -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')