Initial commit in new repository
This commit is contained in:
commit
23c78f2c9c
15 changed files with 4048 additions and 0 deletions
29
src/plugins/Utility.ts
Normal file
29
src/plugins/Utility.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { Plugin, decorators as d } from "knub";
|
||||
import { Message, TextChannel } from "eris";
|
||||
|
||||
export class UtilityPlugin extends Plugin {
|
||||
getDefaultOptions() {
|
||||
return {
|
||||
permissions: {
|
||||
roles: false
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
level: ">=50",
|
||||
permissions: {
|
||||
roles: true
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
@d.command("roles")
|
||||
@d.permission("roles")
|
||||
async rolesCmd(msg: Message) {
|
||||
const roles = (msg.channel as TextChannel).guild.roles.map(
|
||||
role => `${role.name} ${role.id}`
|
||||
);
|
||||
msg.channel.createMessage("```" + roles.join("\n") + "```");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue