hikari.internal.mentions#
Utility functions used for managing mentions on Discord.
Module Contents#
- hikari.internal.mentions.generate_allowed_mentions(mentions_everyone, mentions_reply, user_mentions, role_mentions)[source]#
Generate an allowed mentions JSON object.
- Parameters
- mentions_everyone
hikari.undefined.UndefinedOr
[bool] Whether @everyone and @here mentions are enabled. If
hikari.undefined.UNDEFINED
orFalse
then this will be disabled.- mentions_reply
hikari.undefined.UndefinedOr
[bool] Whether the reply mention should be enabled. If
hikari.undefined.UNDEFINED
orFalse
then this will be disabled.- user_mentions
hikari.undefined.UndefinedOr
[typing.Union
[hikari.snowflakes.SnowflakeishSequence
[hikari.users.PartialUser
], bool]] Either a sequence of objects/IDs of the users to enabled mentions for,
True
to allow all mentions orFalse
/hikari.undefined.UNDEFINED
to disable all user mentions.- role_mentions
hikari.undefined.UndefinedOr
[typing.Union
[hikari.snowflakes.SnowflakeishSequence
[hikari.guilds.PartialRole
], bool]] Either a sequence of objects/IDs of the roles to enabled mentions for,
True
to allow all mentions orFalse
/hikari.undefined.UNDEFINED
to disable all user mentions.
- mentions_everyone
- Returns
hikari.internal.data_binding.JSONObject
The allowed mentions JSON Object.