Werewolf icon indicating copy to clipboard operation
Werewolf copied to clipboard

Topic Support for Bot, resolves #649

Open KMohZaid opened this issue 6 months ago • 5 comments

  1. added /setgrouptopic command which admin can use to set/unset group topic for werewolf bot
  2. added new column in dbo.Group table : GroupTopicId to store topic id
  3. restricts bot command to specified topic only, except admin command and manually allowed command with Attribute AllowOutsideConfiguredTopic

Note : I may have forget some places to update and make topic support

This PR resolves : https://github.com/GreyWolfDev/Werewolf/issues/649

KMohZaid avatar Jun 19 '25 05:06 KMohZaid

this is new PR, as i messed up old one

old PR : https://github.com/GreyWolfDev/Werewolf/pull/660#issue-3148283214

note that i have squashed those 2 commit :

8abf556f fix(/setgrouptopic): complete  TODO 1 and 2, used button for set and unset.
b0ec8681 add(topic support) && update(sql schema)...
  • removed TODO description as they are done.
  • removed database schema update commit line, i think it can be directly done by someone or a separate PR for schema update

KMohZaid avatar Jun 19 '25 05:06 KMohZaid

Those 2 TODO are left(but planned, unrelated to this PR) :

  1. Remove redundant direct call to Telegram send API and make single method that send normal message or document based on flag parameter such as msg_type: [TEXT,DOC,GIF]
  2. A database migrator system, so we can avoid manual database backup and restore

KMohZaid avatar Jun 19 '25 05:06 KMohZaid

(I should note, I have not tried to execute the code to test its functional correctness so far. These are all just my thoughts based on reading it.)

Olgabrezel avatar Jun 23 '25 17:06 Olgabrezel

I will work on reviews when I get time. Thank you for feedback

KMohZaid avatar Jun 24 '25 09:06 KMohZaid

@Olgabrezel check new commit and tell me if there is anything needed to be done

KMohZaid avatar Jun 26 '25 05:06 KMohZaid