Remove self-bot support (#2008)

This commit is contained in:
Michael H
2018-08-24 08:51:03 -04:00
committed by Toby Harradine
parent bc39a6741c
commit 6ebfdef025
6 changed files with 11 additions and 73 deletions

View File

@@ -111,14 +111,6 @@ def parse_cli_flags(args):
help="Force loading specified cogs from the installed packages. "
"Can be used with the --no-cogs flag to load these cogs exclusively.",
)
parser.add_argument(
"--self-bot", action="store_true", help="Specifies if Red should log in as selfbot"
)
parser.add_argument(
"--not-bot",
action="store_true",
help="Specifies if the token used belongs to a bot account.",
)
parser.add_argument(
"--dry-run",
action="store_true",

View File

@@ -235,10 +235,8 @@ class CoreLogic:
str
Invite URL.
"""
if self.bot.user.bot:
app_info = await self.bot.application_info()
return discord.utils.oauth_url(app_info.id)
return "Not a bot account!"
app_info = await self.bot.application_info()
return discord.utils.oauth_url(app_info.id)
@i18n.cog_i18n(_)
@@ -432,10 +430,7 @@ class Core(CoreLogic):
@checks.is_owner()
async def invite(self, ctx):
"""Show's Red's invite url"""
if self.bot.user.bot:
await ctx.author.send(await self._invite_url())
else:
await ctx.send("I'm not a bot account. I have no invite URL.")
await ctx.author.send(await self._invite_url())
@commands.command()
@commands.guild_only()

View File

@@ -94,10 +94,7 @@ def init_events(bot, cli_flags):
data = await bot.application_info()
invite_url = discord.utils.oauth_url(data.id)
except:
if bot.user.bot:
invite_url = "Could not fetch invite url"
else:
invite_url = None
invite_url = "Could not fetch invite url"
prefixes = cli_flags.prefix or (await bot.db.prefix())
lang = await bot.db.locale()