feat: user name
This commit is contained in:
parent
14f8ad4580
commit
943946b7b2
2 changed files with 7 additions and 7 deletions
12
src/index.ts
12
src/index.ts
|
@ -16,13 +16,13 @@ client.on("messageCreate", async (message: Message) => {
|
||||||
|
|
||||||
if (message.author?.bot) {}
|
if (message.author?.bot) {}
|
||||||
else {
|
else {
|
||||||
if (message?.content.startsWith(config.prefix)) {
|
if (message?.content.startsWith(config.prefix)) {
|
||||||
commandHandler(message, config.prefix);
|
commandHandler(message, config.prefix);
|
||||||
}
|
|
||||||
else {
|
|
||||||
nonCommandHandler(message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
nonCommandHandler(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
client.loginBot(config.botKey);
|
client.loginBot(config.botKey);
|
||||||
|
|
|
@ -29,7 +29,7 @@ export async function nonCommandHandler(message : Message){
|
||||||
await message.channel.sendMessage({
|
await message.channel.sendMessage({
|
||||||
content: actualContent,
|
content: actualContent,
|
||||||
masquerade: {
|
masquerade: {
|
||||||
name: alter.name,
|
name: alter.name + " ( " + message.author.id + " )",
|
||||||
avatar: alter.profile_pic_url,
|
avatar: alter.profile_pic_url,
|
||||||
color: alter.color
|
color: alter.color
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue