You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will help prevent unexpected errors due to lack of guild data by running commands in isobot DMs, for commands that require information about guilds (servers).
localembed=discord.Embed(title=f"{ctx.guild.name}\'s automod configuration", description="Use the `/automod_set` command to change your server's automod configuration.", color=color)
ifnotctx.author.guild_permissions.administrator: returnawaitctx.respond("You cannot use this command. If you think this is a mistake, please contact your server owner/administrator.", ephemeral=True)
ifnotctx.author.guild_permissions.administrator: returnawaitctx.respond("You cannot use this command. If you think this is a mistake, please contact your server owner/administrator.", ephemeral=True)
ifnotctx.author.guild_permissions.administrator: returnawaitctx.respond("You cannot use this command. If you think this is a mistake, please contact your server owner/administrator.", ephemeral=True)
ifnotctx.author.guild_permissions.administrator: returnawaitctx.respond("You cannot use this command. If you think this is a mistake, please contact your server owner/administrator.", ephemeral=True)
ifnotctx.author.guild_permissions.administrator: returnawaitctx.respond("You cannot use this command. If you think this is a mistake, please contact your server owner/administrator.", ephemeral=True)
ifnotctx.author.guild_permissions.administrator: returnawaitctx.respond("You cannot use this command. If you think this is a mistake, please contact your server owner/administrator.", ephemeral=True)
ifnotctx.author.guild_permissions.administrator: returnawaitctx.respond("You cannot use this command. If you think this is a mistake, please contact your server owner/administrator.", ephemeral=True)
ifnotctx.author.guild_permissions.administrator: returnawaitctx.respond("You cannot use this command. If you think this is a mistake, please contact your server owner/administrator.", ephemeral=True)
ifnotctx.author.guild_permissions.administrator: returnawaitctx.respond("You cannot use this command. If you think this is a mistake, please contact your server owner/administrator.", ephemeral=True)
@@ -200,6 +213,7 @@ async def automod_linkblocker_remove_blacklist(self, ctx: ApplicationContext, id
200
213
name="linkblocker_remove_whitelist",
201
214
description="Removes a whitelisted link (matching its id) from this server's link blocker"
202
215
)
216
+
@commands.guild_only()
203
217
@option(name="id", description="What's the id of the link to remove? (can be found through /automod_view_whitelisted_links", type=int)
ifnotctx.author.guild_permissions.administrator: returnawaitctx.respond("You cannot use this command. If you think this is a mistake, please contact your server owner/administrator.", ephemeral=True)
0 commit comments