Red-discordbot: [Context] Add a method equivalent to `ctx.tick()` which can also send a message to the user.

Created on 20 Jul 2020  路  5Comments  路  Source: Cog-Creators/Red-DiscordBot

This method should either send a message or the tick, defaulting to the message if not configured.

The configuration should be per-server, and if disable it should only add a tick and mirror ctx.tick() and if enabled it should send the specified message to the context.

Needs Triage Feature

Most helpful comment

I'm not a fan of the bot having two different appearances for response in the same server.

All 5 comments

May I suggest that configuration be per-user, instead? That way it can carry accross servers (and into DMs) and only users who really want it would get it, rather than everyone in a server getting clutter from the bot responding with a message.

I'm not a fan of the bot having two different appearances for response in the same server.

I think its fine for having user level config that is applied in DMs. but I don't think the user setting should be used at all in a server.

The response style should be kept consistent, if a server admin sets it to only add tick() to avoid extra messages, I don't think the user should be able to override that.

What about something such as the below?

# as a method of Context
    async def simple_success(self, message: str) -> None:
        """
        Indicate a simple success.
        This will either add a reaction or send the specified message
        depending on the context specific settings, and should only
        be used for simple successes which can be represented by either option.
        """
        # actual implementation based on settings here

Just so its all in one place, simple_success should also use maybe_send_embed to respect embed settings.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sinnoma picture Sinnoma  路  4Comments

irdumbs picture irdumbs  路  4Comments

clovisd picture clovisd  路  3Comments

Kowlin picture Kowlin  路  4Comments

TrustyJAID picture TrustyJAID  路  3Comments