Acier
Acier
Explore posts from servers
SIASapphire - Imagine a framework
Created by Acier on 2/2/2023 in #sapphire-support
Application Commands
3. Copied the wrong Id
8 replies
SIASapphire - Imagine a framework
Created by Acier on 2/2/2023 in #sapphire-support
Application Commands
// Register Slash Command
public override registerApplicationCommands(registry: ChatInputCommand.Registry)
{
registry
.registerContextMenuCommand(builder =>
builder
.setName('Toggle Author')
.setType(ApplicationCommandType.Message)
, {guildIds: ['993567738360496288']})
}
// Register Slash Command
public override registerApplicationCommands(registry: ChatInputCommand.Registry)
{
registry
.registerContextMenuCommand(builder =>
builder
.setName('Toggle Author')
.setType(ApplicationCommandType.Message)
, {guildIds: ['993567738360496288']})
}
8 replies
SIASapphire - Imagine a framework
Created by Acier on 1/30/2023 in #discordjs-support
Should my bot sending out dm's trigger it's own messageCreate event?
Would love that, is it in the guide? I thought the standard djs events were already pre-parsed
30 replies
SIASapphire - Imagine a framework
Created by Acier on 1/30/2023 in #discordjs-support
Should my bot sending out dm's trigger it's own messageCreate event?
I cut out all the actual implementation, it's meant to forward the bot's dm's to log channels, but I cut all that out
30 replies
SIASapphire - Imagine a framework
Created by Acier on 1/30/2023 in #discordjs-support
Should my bot sending out dm's trigger it's own messageCreate event?
export class MessageManager
{
public static async onMessage(message: Message) {
if (message.channel.type == "DM" && message.content) {
console.log(message.content)
console.log(message.author)
// Send a reaction
await message.react('✅')
}
}
}
export class MessageManager
{
public static async onMessage(message: Message) {
if (message.channel.type == "DM" && message.content) {
console.log(message.content)
console.log(message.author)
// Send a reaction
await message.react('✅')
}
}
}
30 replies
SIASapphire - Imagine a framework
Created by Acier on 1/30/2023 in #discordjs-support
Should my bot sending out dm's trigger it's own messageCreate event?
export class MessageCreateListener extends Listener
{
public constructor(context: Listener.Context, options: Listener.Options)
{
super(context, {
...options,
once: false,
event: 'messageCreate'
});
}

public async run(message: Message)
{
// @ts-ignore
if (message.partial) message = await message.fetch().catch(() => {});

if (message.content == 'ping')
await message.reply('pong')

MessageManager.onMessage(message).then(() => {});
}
export class MessageCreateListener extends Listener
{
public constructor(context: Listener.Context, options: Listener.Options)
{
super(context, {
...options,
once: false,
event: 'messageCreate'
});
}

public async run(message: Message)
{
// @ts-ignore
if (message.partial) message = await message.fetch().catch(() => {});

if (message.content == 'ping')
await message.reply('pong')

MessageManager.onMessage(message).then(() => {});
}
30 replies
SIASapphire - Imagine a framework
Created by Acier on 1/30/2023 in #discordjs-support
Should my bot sending out dm's trigger it's own messageCreate event?
Alright, let me share code
30 replies
SIASapphire - Imagine a framework
Created by Acier on 1/30/2023 in #discordjs-support
Should my bot sending out dm's trigger it's own messageCreate event?
Sapphire
30 replies
SIASapphire - Imagine a framework
Created by Acier on 12/25/2022 in #sapphire-support
Error [UNLOADED_PIECE] The piece 'CoreReady' does not exist.
I moved my client.login to a different file and forgot to re-upload the file I removed the old call from, so it was getting called twice. Sorry to bother
29 replies
SIASapphire - Imagine a framework
Created by Acier on 12/25/2022 in #sapphire-support
Error [UNLOADED_PIECE] The piece 'CoreReady' does not exist.
Anyone know anything about this?
29 replies