mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-07 11:07:19 +00:00
Fix userid/channelid argument types; rename userid/userID to userId for consistency; misc code style fix
This commit is contained in:
parent
afd677b270
commit
8d8343543d
6 changed files with 17 additions and 17 deletions
|
@ -40,7 +40,7 @@ export class NameHistoryPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
this.usernameHistory = new UsernameHistory();
|
||||
}
|
||||
|
||||
@d.command("names", "<userId:userid>")
|
||||
@d.command("names", "<userId:userId>")
|
||||
@d.permission("can_view")
|
||||
async namesCmd(msg: Message, args: { userId: string }) {
|
||||
const nicknames = await this.nicknameHistory.getByUserId(args.userId);
|
||||
|
@ -72,7 +72,7 @@ export class NameHistoryPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
@d.event("guildMemberUpdate")
|
||||
async onGuildMemberUpdate(_, member: Member) {
|
||||
const latestEntry = await this.nicknameHistory.getLastEntry(member.id);
|
||||
if (!latestEntry || latestEntry.nickname != member.nick) {
|
||||
if (!latestEntry || latestEntry.nickname !== member.nick) {
|
||||
// tslint:disable-line
|
||||
await this.nicknameHistory.addEntry(member.id, member.nick);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue