Added presence command #18 #126

Merged
edraft merged 2 commits from #18 into 0.3 2022-11-20 15:41:26 +01:00
Contributor

#18

#18
Ebola-Chan added this to the Sprint 0.3 milestone 2022-11-20 14:17:55 +01:00
Ebola-Chan self-assigned this 2022-11-20 14:17:55 +01:00
Ebola-Chan added 1 commit 2022-11-20 14:17:56 +01:00
Ebola-Chan requested review from edraft 2022-11-20 14:18:01 +01:00
Ebola-Chan added this to the Sprint 0.3 project 2022-11-20 14:18:10 +01:00
edraft requested changes 2022-11-20 14:30:32 +01:00
@ -0,0 +29,4 @@
@commands.hybrid_command()
@commands.guild_only()
@CommandChecks.check_is_ready()
@CommandChecks.check_is_member_technician()
Owner

Moderator nicht Techniker

Moderator nicht Techniker
Author
Contributor

Hatten wir das nicht besprochen dass nur wir die Presence setzen sollen, da diese Global ist?

Hatten wir das nicht besprochen dass nur wir die Presence setzen sollen, da diese Global ist?
Owner

War ein aspekt aber mir solls egal sein, zu mal das nicht im Issue geändert wurde.

War ein aspekt aber mir solls egal sein, zu mal das nicht im Issue geändert wurde.
Ebola-Chan marked this conversation as resolved
@ -0,0 +33,4 @@
async def presence(self, ctx: Context, text: str = ''):
self._logger.debug(__name__, f'Received command presence {ctx}')
if text == '':
Owner

early returns pls:

if text == '':
    await self._bot.change_presence(activity=None)
    await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.base.presence.removed'))
    return

if len(text) > 128:
	await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.base.presence.max_char_count_exceeded'))
	return

await self._bot.change_presence(activity=discord.Game(name=text))
await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.base.presence.changed'))

early returns pls: ```py if text == '': await self._bot.change_presence(activity=None) await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.base.presence.removed')) return if len(text) > 128: await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.base.presence.max_char_count_exceeded')) return await self._bot.change_presence(activity=discord.Game(name=text)) await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.base.presence.changed')) ```
Ebola-Chan marked this conversation as resolved
Ebola-Chan added 1 commit 2022-11-20 15:39:43 +01:00
edraft approved these changes 2022-11-20 15:41:08 +01:00
edraft merged commit c7a925b997 into 0.3 2022-11-20 15:41:26 +01:00
edraft deleted branch #18 2022-11-20 15:41:27 +01:00
edraft removed this from the Sprint 0.3 milestone 2023-02-13 10:29:20 +01:00
Sign in to join this conversation.
No description provided.