mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
Knub 30 conversion base work; Work on Utility plugin Knub 30 conversion
This commit is contained in:
parent
1bf5a7fa28
commit
d62a4e26ae
18 changed files with 585 additions and 324 deletions
23
backend/src/plugins/Utility/commands/LevelCmd.ts
Normal file
23
backend/src/plugins/Utility/commands/LevelCmd.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { utilityCmd } from "../types";
|
||||
import { customArgumentHelpers as ct } from "../../../customArgumentTypes";
|
||||
import { helpers } from "knub";
|
||||
|
||||
const { getMemberLevel } = helpers;
|
||||
|
||||
export const LevelCmd = utilityCmd(
|
||||
"level",
|
||||
{
|
||||
member: ct.resolvedMember({ required: false }),
|
||||
},
|
||||
|
||||
{
|
||||
description: "Show the permission level of a user",
|
||||
usage: "!level 106391128718245888",
|
||||
},
|
||||
|
||||
({ message, args, pluginData }) => {
|
||||
const member = args.member || message.member;
|
||||
const level = getMemberLevel(pluginData, member);
|
||||
message.channel.createMessage(`The permission level of ${member.username}#${member.discriminator} is **${level}**`);
|
||||
}
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue