mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
fix: args example
This commit is contained in:
parent
b2eb776db6
commit
c4af965d13
@ -22,11 +22,11 @@ session.on("ready", (payload) => {
|
|||||||
const PREFIX = ">";
|
const PREFIX = ">";
|
||||||
|
|
||||||
session.on("messageCreate", (message) => {
|
session.on("messageCreate", (message) => {
|
||||||
if (message.author.bot || message.content.startsWith(PREFIX)) {
|
if (message.author?.bot || !message.content.startsWith(PREFIX)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const args = message.content.slice(PREFIX.length).trim().split(/\s+/gm);
|
const args = message.content.substring(PREFIX.length).trim().split(/\s+/gm);
|
||||||
const name = args.shift()?.toLowerCase();
|
const name = args.shift()?.toLowerCase();
|
||||||
|
|
||||||
if (name === "ping") {
|
if (name === "ping") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user