mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
Add ReactionRoles plugin
This commit is contained in:
parent
92e5282b70
commit
c0614f2470
6 changed files with 271 additions and 1 deletions
18
migrations/20180729142200_create_reaction_roles_table.js
Normal file
18
migrations/20180729142200_create_reaction_roles_table.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
exports.up = async function(knex, Promise) {
|
||||
if (! await knex.schema.hasTable('reaction_roles')) {
|
||||
await knex.schema.createTable('reaction_roles', table => {
|
||||
table.string('guild_id', 20).notNullable();
|
||||
table.string('channel_id', 20).notNullable();
|
||||
table.string('message_id', 20).notNullable();
|
||||
table.string('emoji', 20).notNullable();
|
||||
table.string('role_id', 20).notNullable();
|
||||
|
||||
table.primary(['guild_id', 'channel_id', 'message_id', 'emoji']);
|
||||
table.index(['message_id', 'emoji']);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
exports.down = async function(knex, Promise) {
|
||||
await knex.schema.dropTableIfExists('reaction_roles');
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue