Skip to content

Support allowed_mentions in the root bot config #52

@Arcensoth

Description

@Arcensoth

(Originally from: CommanderBot-Dev/commanderbot-core#4)

The bot core converts the intents field into an Intents object, which is accepted by the inherited discord.py Bot class:

{
  "command_prefix": ">",
  "intents": "all"
}

However, the allowed_mentions field is not converted and raises an error when configured from raw data:

{
  "command_prefix": ">",
  "allowed_mentions": {
    "everyone": false,
    "users": false,
    "roles": false,
    "replied_user": true
  }
}

Being able to pass in allowed_mentions from raw data would allow bot owners to do things like disable at-everyone and/or other types of pings globally by default.

It may also be wise to disable at-everyone pings by default during deserialization if it is not declared explicitly. (Otherwise it will be enabled by default via discord.py itself.)

See: https://discordpy.readthedocs.io/en/stable/api.html?highlight=allowed_mentions#discord.AllowedMentions

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions