mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
Update dependencies (#2148)
Core dependencies: - discord.py: Rapptz/discord.py@00a659c6 -> Rapptz/discord.py@00a659c6 - multidict: 4.4.0 -> 4.4.2 [docs] - pyparsing: 2.2.0 -> 2.2.1 - sphinx: 1.7.8 -> 1.7.9 [test] - pytest: 3.7.4 -> 3.8.1 [style] - toml: 0.9.4 -> 0.9.6 ---- I've also replaced usages of `discord.utils.get(guild.roles, id=id)` with the new O(1) `guild.get_role(id)` method. Signed-off-by: Toby <tobyharradine@gmail.com>
This commit is contained in:
@@ -609,10 +609,13 @@ class Core(CoreLogic):
|
||||
"""Changes Red's settings"""
|
||||
if ctx.invoked_subcommand is None:
|
||||
if ctx.guild:
|
||||
admin_role_id = await ctx.bot.db.guild(ctx.guild).admin_role()
|
||||
admin_role = discord.utils.get(ctx.guild.roles, id=admin_role_id) or "Not set"
|
||||
mod_role_id = await ctx.bot.db.guild(ctx.guild).mod_role()
|
||||
mod_role = discord.utils.get(ctx.guild.roles, id=mod_role_id) or "Not set"
|
||||
guild = ctx.guild
|
||||
admin_role = (
|
||||
guild.get_role(await ctx.bot.db.guild(ctx.guild).admin_role()) or "Not set"
|
||||
)
|
||||
mod_role = (
|
||||
guild.get_role(await ctx.bot.db.guild(ctx.guild).mod_role()) or "Not set"
|
||||
)
|
||||
prefixes = await ctx.bot.db.guild(ctx.guild).prefix()
|
||||
guild_settings = f"Admin role: {admin_role}\nMod role: {mod_role}\n"
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user