Psyonix_
Psyonix_
DIAdiscord.js - Imagine an app
Created by Anurag Bansal on 1/18/2024 in #djs-questions
A discord bot to show every member's current time
it's not c++ where you have access to one's machine but javascript
16 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
oh i see
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
like just send it once and then ignore the rest of the executions while ratelimited
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
like if you keep executing the command it would send the ratelimiter message multiple times and that could cause the bot to be ratelimited by discord
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
now, is there also a way to just send that message once and that's it?
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
i see, thanks for that
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
is there also a way to just send that message once and that's it?
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
oh now it does seem to work but the timer goes back
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
does not seem like messageCommandDenied works
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
my messageCommandSuccess works just fine
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
i see, but the bot won't send that message
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
i want to send a message in the channel when a command is in cooldown
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
messageCommandDenied
import type { MessageCommandDeniedPayload, Events } from '@sapphire/framework';
import { Listener, UserError } from '@sapphire/framework';

export class UserEvent extends Listener<typeof Events.MessageCommandDenied> {
public async run(
{ context, message: content }: UserError,
{ message }: MessageCommandDeniedPayload
) {
// `context: { silent: true }` should make UserError silent:
// Use cases for this are for example permissions error when running the `eval` command.
if (Reflect.get(Object(context), 'silent')) return;

return message.channel.send({
content,
allowedMentions: { users: [message.author.id], roles: [] },
});
}
}
import type { MessageCommandDeniedPayload, Events } from '@sapphire/framework';
import { Listener, UserError } from '@sapphire/framework';

export class UserEvent extends Listener<typeof Events.MessageCommandDenied> {
public async run(
{ context, message: content }: UserError,
{ message }: MessageCommandDeniedPayload
) {
// `context: { silent: true }` should make UserError silent:
// Use cases for this are for example permissions error when running the `eval` command.
if (Reflect.get(Object(context), 'silent')) return;

return message.channel.send({
content,
allowedMentions: { users: [message.author.id], roles: [] },
});
}
}
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
yes
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
events or preconditions?
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 1/9/2024 in #sapphire-support
how to make message when command is in cooldown?
all are already implemented
27 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 3/6/2023 in #sapphire-support
bot won't get on and connect to discord.
rofl
60 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 3/6/2023 in #sapphire-support
bot won't get on and connect to discord.
dude it's fine, i'll just go through it
60 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 3/6/2023 in #sapphire-support
bot won't get on and connect to discord.
there are many guides, just asked if you could point out which one to read lol
60 replies
SIASapphire - Imagine a framework
Created by Psyonix_ on 3/6/2023 in #sapphire-support
bot won't get on and connect to discord.
yep i know
60 replies