3
0
Fork 0
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:
Dragory 2018-07-29 15:18:26 +03:00
parent 92e5282b70
commit c0614f2470
6 changed files with 271 additions and 1 deletions

View 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');
};