Use more professional language on vote

This commit is contained in:
Adriene Hutchins 2020-03-02 01:37:35 -05:00
parent a90db12487
commit 997030587c
1 changed files with 6 additions and 2 deletions

View File

@ -18,16 +18,19 @@ class BotList(commands.Cog, name='Bot List'):
def __init__(self, bot): def __init__(self, bot):
self.bot = bot self.bot = bot
self.request = bot.request self.request = bot.request
# Tokens
self.dbl_token = bot.config['DBL'] self.dbl_token = bot.config['DBL']
self.dbots_token = bot.config['DBOTS'] self.dbots_token = bot.config['DBOTS']
self.bod_token = bot.config['BOD'] self.bod_token = bot.config['BOD']
self.dblcom_token = bot.config['DBLCOM'] self.dblcom_token = bot.config['DBLCOM']
# top.gg clent
self.dbl_client = dbl.DBLClient( self.dbl_client = dbl.DBLClient(
self.bot, self.dbots_token) self.bot, self.dbots_token)
async def _update_logic(self): async def _update_logic(self):
"""Handles all statistic updating for various different bot lists.""" """Handles all statistic updating for various different bot lists."""
# Prerequisites
dbots_call = "https://discord.bots.gg/api/v1" dbots_call = "https://discord.bots.gg/api/v1"
bod_call = "https://bots.ondiscord.xyz/bot-api/" bod_call = "https://bots.ondiscord.xyz/bot-api/"
dblcom_call = "https://discordbotlist.com/api" dblcom_call = "https://discordbotlist.com/api"
@ -83,12 +86,13 @@ class BotList(commands.Cog, name='Bot List'):
# TODO Move to Core, hide behind check for any existing token # TODO Move to Core, hide behind check for any existing token
@commands.command(aliases=['review']) @commands.command(aliases=['review'])
async def vote(self, ctx): async def vote(self, ctx):
"""Review and vote for us on various botlists!""" """Review and vote for this bot on various botlists."""
msg = ( msg = (
"**Thank you for wanting to help us out!**\n" "**Thank you for wanting to help us out!**\n"
"You can find us on the following lists:\n\n" "You can find us on the following lists:\n\n"
) )
if self.dbots_token != '': if self.dbots_token != '':
msg += f"_bots.discord.gg_ <https://bots.discord.gg/bots/{self.bot.user.id}/>\n" msg += f"_bots.discord.gg_ <https://bots.discord.gg/bots/{self.bot.user.id}/>\n"
if self.bod_token != '': if self.bod_token != '':
@ -107,7 +111,7 @@ class BotList(commands.Cog, name='Bot List'):
msg = await ctx.send("<a:loading:393852367751086090> **Updating...**") msg = await ctx.send("<a:loading:393852367751086090> **Updating...**")
responses = await self._update_logic() responses = await self._update_logic()
print(responses) print(responses) # TODO Look at responses and figure out error handling
await msg.edit(content="**Updated!**") await msg.edit(content="**Updated!**")
@tasks.loop(minutes=15.0) @tasks.loop(minutes=15.0)