-
Notifications
You must be signed in to change notification settings - Fork 387
Topic Support for Bot, resolves #649 #662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: beta
Are you sure you want to change the base?
Conversation
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 is new PR, as i messed up old one
note that i have squashed those 2 commit :
|
|
Those 2 TODO are left(but planned, unrelated to this PR) :
|
Olgabrezel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thank you for the pull request!
I left some review comments, I think some parts of the design should be improved before we merge this.
If you could take a look at this, it would be highly appreciated!
In case of questions, just comment here, or ask on Support, whichever seems more appropriate!
Werewolf for Telegram/Werewolf Control/Commands/AdminCommands.cs
Outdated
Show resolved
Hide resolved
Werewolf for Telegram/Werewolf Control/Commands/AdminCommands.cs
Outdated
Show resolved
Hide resolved
Werewolf for Telegram/Werewolf Control/Handlers/UpdateHandler.cs
Outdated
Show resolved
Hide resolved
Werewolf for Telegram/Werewolf Control/Handlers/UpdateHandler.cs
Outdated
Show resolved
Hide resolved
Werewolf for Telegram/Werewolf Control/Handlers/UpdateHandler.cs
Outdated
Show resolved
Hide resolved
|
(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.) |
|
I will work on reviews when I get time. Thank you for feedback |
|
@Olgabrezel check new commit and tell me if there is anything needed to be done |
|
|
||
| <string key="SetTopicCmdNotInGeneral"> | ||
| <value>❌ You must run this command inside a topic/thread (not the general topic).</value> | ||
| </string> | ||
| <string key="SetTopicSuccess"> | ||
| <value>✅ Group topic has been set successfully.</value> | ||
| </string> | ||
| <string key="UnsetTopicSuccess"> | ||
| <value>🗑️ Group topic has been unset.</value> | ||
| </string> | ||
|
|
||
| <string key="MustRunInConfiguredTopic"> | ||
| <value>This command can only be used in the configured topic/thread. (Topic id : {0})</value> | ||
| </string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, forget to format it to proper indentation
/setgrouptopiccommand which admin can use to set/unset group topic for werewolf botdbo.Grouptable :GroupTopicIdto store topic idAllowOutsideConfiguredTopicNote : I may have forget some places to update and make topic support
This PR resolves :
#649