Compare commits
No commits in common. "3117f617d9dfefa7ce6fa11a3b61ae0af082e56b" and "3d9cd0a2fceba66f569b029a117953a695436464" have entirely different histories.
3117f617d9
...
3d9cd0a2fc
@ -123,9 +123,6 @@
|
|||||||
},
|
},
|
||||||
"success": "auto-role {} wurde entfernt :D"
|
"success": "auto-role {} wurde entfernt :D"
|
||||||
},
|
},
|
||||||
"react": {
|
|
||||||
"success": "Alle Reaktionen wurden hinzugefügt"
|
|
||||||
},
|
|
||||||
"rule": {
|
"rule": {
|
||||||
"add": {
|
"add": {
|
||||||
"error": {
|
"error": {
|
||||||
|
@ -220,48 +220,6 @@ class AutoRoleGroup(DiscordCommandABC):
|
|||||||
) -> TList[app_commands.Choice[str]]:
|
) -> TList[app_commands.Choice[str]]:
|
||||||
return await self._auto_role_auto_complete(interaction, current)
|
return await self._auto_role_auto_complete(interaction, current)
|
||||||
|
|
||||||
@auto_role.command("react")
|
|
||||||
@commands.guild_only()
|
|
||||||
@CommandChecks.check_is_ready()
|
|
||||||
@CommandChecks.check_is_member_moderator()
|
|
||||||
async def react(self, ctx: Context, auto_role: int):
|
|
||||||
self._logger.debug(__name__, f"Received command auto-role react {ctx} {auto_role}")
|
|
||||||
if ctx.guild is None:
|
|
||||||
return
|
|
||||||
|
|
||||||
server_config: ServerConfig = self._config.get_configuration(f"ServerConfig_{ctx.guild.id}")
|
|
||||||
if not FeatureFlagsSettings.get_flag_from_dict(server_config.feature_flags, FeatureFlagsEnum.auto_role_module):
|
|
||||||
return
|
|
||||||
|
|
||||||
auto_role_from_db = self._auto_roles.find_auto_role_by_id(auto_role)
|
|
||||||
if auto_role_from_db is None:
|
|
||||||
self._logger.debug(__name__, f"auto-role {auto_role} not found")
|
|
||||||
await self._message_service.send_ctx_msg(
|
|
||||||
ctx,
|
|
||||||
self._t.transform("modules.auto_role.remove.error.not_found").format(auto_role),
|
|
||||||
)
|
|
||||||
self._logger.trace(__name__, f"Finished command auto-role react")
|
|
||||||
return
|
|
||||||
|
|
||||||
for rule in self._auto_roles.get_auto_role_rules_by_auto_role_id(auto_role_from_db.id):
|
|
||||||
self._bot.loop.create_task(
|
|
||||||
await self._client_utils.react_to_message_by_auto_role_rule(
|
|
||||||
auto_role_from_db.discord_channel_id, auto_role_from_db.discord_message_id, rule, ctx.guild
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
await self._message_service.send_ctx_msg(
|
|
||||||
ctx,
|
|
||||||
self._t.transform("modules.auto_role.react.success"),
|
|
||||||
)
|
|
||||||
self._logger.trace(__name__, f"Finished command auto-role react")
|
|
||||||
|
|
||||||
@remove.autocomplete("auto_role")
|
|
||||||
async def react_autocomplete(
|
|
||||||
self, interaction: discord.Interaction, current: str
|
|
||||||
) -> TList[app_commands.Choice[str]]:
|
|
||||||
return await self._auto_role_auto_complete(interaction, current)
|
|
||||||
|
|
||||||
@auto_role.group()
|
@auto_role.group()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
async def rule(self, ctx: Context):
|
async def rule(self, ctx: Context):
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "kdb-web",
|
"name": "kdb-web",
|
||||||
"version": "1.1.8",
|
"version": "1.1.7",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"update-version": "ts-node update-version.ts",
|
"update-version": "ts-node update-version.ts",
|
||||||
|
@ -199,7 +199,7 @@ export class AutoRolesComponent extends ComponentWithTable implements OnInit, On
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!newAutoRole.id && !this.isEditingNew || !newAutoRole.channelId && !newAutoRole.messageId) {
|
if (!newAutoRole.id || !newAutoRole.channelId && !newAutoRole.messageId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
"WebVersion": {
|
"WebVersion": {
|
||||||
"Major": "1",
|
"Major": "1",
|
||||||
"Minor": "1",
|
"Minor": "1",
|
||||||
"Micro": "8"
|
"Micro": "7"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user