feat: adding color changing
This commit is contained in:
parent
28ed823e2b
commit
680eeea7a1
4 changed files with 7 additions and 2 deletions
1
src/commands/colorAlterChange.ts
Normal file
1
src/commands/colorAlterChange.ts
Normal file
|
@ -0,0 +1 @@
|
||||||
|
export async function colorAlterChange(userId: string, args: string[]){}
|
1
src/commands/colorAlterChange.ts~
Normal file
1
src/commands/colorAlterChange.ts~
Normal file
|
@ -0,0 +1 @@
|
||||||
|
export function colorAlterChange(userId: string, args: string[]){}
|
|
@ -14,9 +14,10 @@ client.on("messageCreate", async (message: Message) => {
|
||||||
try{if (!message.author) {await client.users.fetch(message.authorId)} }
|
try{if (!message.author) {await client.users.fetch(message.authorId)} }
|
||||||
catch(e){console.log(e)}
|
catch(e){console.log(e)}
|
||||||
|
|
||||||
|
if (message === undefined) {return}
|
||||||
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 {
|
else {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { listAlters } from "../commands/listAlters"
|
||||||
import { createAlter } from "../commands/createAlter"
|
import { createAlter } from "../commands/createAlter"
|
||||||
import { deleteAlter } from "../commands/deleteAlter"
|
import { deleteAlter } from "../commands/deleteAlter"
|
||||||
import { avatarAlterChange } from "../commands/avatarAlterChange"
|
import { avatarAlterChange } from "../commands/avatarAlterChange"
|
||||||
|
import { colorAlterChange } from "../commands/colorAlterChange"
|
||||||
import { split } from "shlex"
|
import { split } from "shlex"
|
||||||
|
|
||||||
export async function commandHandler(message : Message, prefix : String) {
|
export async function commandHandler(message : Message, prefix : String) {
|
||||||
|
@ -34,6 +35,7 @@ export async function commandHandler(message : Message, prefix : String) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case "color" : {
|
case "color" : {
|
||||||
|
await message.reply(await colorAlterChange(message.author.id, args));
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue