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
returnawaitctx.respond(f"You have been successfully verified in **{vcode_guild.name}**!")
267
+
268
+
# Autoresponder Configuration Commands
269
+
autoresponder_commands=SlashCommandGroup(name="autoresponder", description="Commands related to the management of server text-based autoresponders.")
270
+
271
+
@autoresponder_commands.command(
272
+
name="autoresponder_add",
273
+
description="Add a new text-based autoresponder to your server."
274
+
)
275
+
@option(name="autoresponder_name", description="The name (id) of the autoresponder.", type=str)
276
+
@option(name="text_trigger", description="The text on which the autoresponder is triggered.", type=str)
277
+
@option(name="text_response", description="The response you want the bot to send, when triggered.", type=str)
278
+
@option(name="trigger_condition", description="How do you want the autoresponder to be triggered?", type=str, choices=["MATCH_MESSAGE", "WITHIN_MESSAGE"])
279
+
@option(name="active_channel", description="In which channel do you want the autoresponder to be active?", type=discord.TextChannel, default=None)
280
+
@option(name="match_case", description="Do you want the trigger to be case-sensitive?", type=bool, default=False)
description=f"Autoresponder Name: `{autoresponder_name}`\n\nYou may use the autoresponder name to reference this autoresponder, for editing or deleting.",
localembed=discord.Embed(title=":x: Failed to Remove Autoresponder", description=f"You don't have an autoresponder set with the name `{autoresponder_name}`.", color=discord.Color.red())
328
+
returnawaitctx.respond(embed=localembed)
329
+
elifresult_code==2:
330
+
localembed=discord.Embed(
331
+
title=":grey_question: No Autoresponders Set",
332
+
description=f"You don't have any autoresponders you can remove, let alone something with the name `{autoresponder_name}`.",
localembed=discord.Embed(title=":x: No Autoresponder Found", description=f"You don't have an autoresponder set with the name `{autoresponder_name}`.", color=discord.Color.red())
"""Adds a new autoresponder configuration for the specified guild, with the provided configuration data. Returns `0` if successful, returns `1` if configuration with same name already exists.\n\nNotes: \n- `autoreponder_name` can be considered as autoresponder id."""
"""Removes an existing autoresponder from the specified guild's serverconfig data. Returns `0` if successful, returns `1` if autoresponder does not exist, returns `2` if no autoresponders set up."""
Copy file name to clipboardExpand all lines: main.py
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -307,6 +307,26 @@ async def on_message(ctx):
307
307
# In that case isobot will automatically stop sending levelup messages to them
308
308
logger.warn(f"Unable to send level up message to {ctx.author} ({ctx.author.id}), as they are not accepting DMs from isobot. This ID has been added to `levelup_messages` blacklist.", module="main/Levelling")
0 commit comments