mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Make message with default buttons stateful
This commit is contained in:
parent
5efdf5ce95
commit
5c7c3c8cba
10 changed files with 158 additions and 47 deletions
|
@ -38,9 +38,17 @@ export class GuildButtonRoles extends BaseGuildRepository {
|
|||
});
|
||||
}
|
||||
|
||||
async add(messageId: string, buttonId: string, buttonGroup: string, buttonName: string) {
|
||||
async getForButtonGroup(buttonGroup: string) {
|
||||
return this.buttonRoles.find({
|
||||
guild_id: this.guildId,
|
||||
button_group: buttonGroup,
|
||||
});
|
||||
}
|
||||
|
||||
async add(channelId: string, messageId: string, buttonId: string, buttonGroup: string, buttonName: string) {
|
||||
await this.buttonRoles.insert({
|
||||
guild_id: this.guildId,
|
||||
channel_id: channelId,
|
||||
message_id: messageId,
|
||||
button_id: buttonId,
|
||||
button_group: buttonGroup,
|
||||
|
|
|
@ -6,6 +6,10 @@ export class ButtonRole {
|
|||
@PrimaryColumn()
|
||||
guild_id: string;
|
||||
|
||||
@Column()
|
||||
@PrimaryColumn()
|
||||
channel_id: string;
|
||||
|
||||
@Column()
|
||||
@PrimaryColumn()
|
||||
message_id: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue