Ownix
Ownix
Explore posts from servers
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
After all, having commands rely on prefixes is not enough for getting the intent's approval.
Is that just because the API has more ceremony around slash commands?
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
That is helpful information regarding this being a discord API v9 -> v10 thing.
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
@kyra 🩵🩷🤍🩷🩵 Thanks for the quick help. It would probably have taken me agest to compare the intents before I noticed the new required one.
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
I ported my intents from just strings: old:
intents: [
'GUILDS',
'GUILD_MEMBERS',
'GUILD_BANS',
'GUILD_EMOJIS_AND_STICKERS',
'GUILD_VOICE_STATES',
'GUILD_MESSAGES',
'GUILD_MESSAGE_REACTIONS',
'DIRECT_MESSAGES',
'DIRECT_MESSAGE_REACTIONS'
],
intents: [
'GUILDS',
'GUILD_MEMBERS',
'GUILD_BANS',
'GUILD_EMOJIS_AND_STICKERS',
'GUILD_VOICE_STATES',
'GUILD_MESSAGES',
'GUILD_MESSAGE_REACTIONS',
'DIRECT_MESSAGES',
'DIRECT_MESSAGE_REACTIONS'
],
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
That fixed it. Why is there 0 errors in logs???
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
If there was a conflict with my intents, would that cause Discord to ignore my bot?
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
import './lib/setup';
import { LogLevel, SapphireClient } from '@sapphire/framework';
import { GatewayIntentBits, Partials } from 'discord.js';
import '@sapphire/plugin-logger/register';

const client = new SapphireClient({
defaultPrefix: '!',
regexPrefix: /^(hey +)?bot[,! ]/i,
caseInsensitiveCommands: true,
logger: {
level: LogLevel.Debug
},
shards: 'auto',
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildModeration,
GatewayIntentBits.GuildEmojisAndStickers,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageReactions,
],
partials: [Partials.Channel],
loadMessageCommandListeners: true
});

const main = async () => {
try {
client.logger.info('Logging in');
await client.login();
client.logger.info('logged in');
} catch (error) {
client.logger.fatal(error);
client.destroy();
process.exit(1);
}
};

main();
import './lib/setup';
import { LogLevel, SapphireClient } from '@sapphire/framework';
import { GatewayIntentBits, Partials } from 'discord.js';
import '@sapphire/plugin-logger/register';

const client = new SapphireClient({
defaultPrefix: '!',
regexPrefix: /^(hey +)?bot[,! ]/i,
caseInsensitiveCommands: true,
logger: {
level: LogLevel.Debug
},
shards: 'auto',
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildModeration,
GatewayIntentBits.GuildEmojisAndStickers,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildMessageReactions,
GatewayIntentBits.DirectMessages,
GatewayIntentBits.DirectMessageReactions,
],
partials: [Partials.Channel],
loadMessageCommandListeners: true
});

const main = async () => {
try {
client.logger.info('Logging in');
await client.login();
client.logger.info('logged in');
} catch (error) {
client.logger.fatal(error);
client.destroy();
process.exit(1);
}
};

main();
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
Yes I ported my old commands over to it as there were many changes to setup.ts and index.ts and utils.ts and basically every file.
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
yes, when you do sapphire new and then select "Complete template" from the options. It will generate a simple bot which will include a "Ping" command. The default prefix is "!" as well. Starting my bot and running !ping does nothing. No logs either. As you can see login seems successful and many commands have been scanned and registered.
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
If I at least had some log errors to go off of...
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
No description
28 replies
SIASapphire - Imagine a framework
Created by Ownix on 5/22/2024 in #sapphire-support
Just updated to 5.2.1 nothing working and no errors
@kyra 🩵🩷🤍🩷🩵 Thanks for your reply. I meant 5.2.1 that is my bad. What do you mean by Chat input? And I do not see any context menu items but I will admit I am new with context menu items. For example, typing !ping as per the default command that ships with the "Complete template" does nothng right now.
28 replies
NNuxt
Created by Ownix on 5/13/2024 in #❓・help
How to provide a client-side dependency to my app?
Should I even bother making it a plugin and instead simply import the pocketbase module in the components/pages that use it?
2 replies
CC#
Created by Ownix on 8/2/2023 in #help
❔ Is there a pattern for having a single collection of different object types?
@TeBeClone I think I have a working example now: https://dotnetfiddle.net/drzai7 Question, is there a way to take an existing command (public class Command2 : WorkflowCommand) and convert it to a ScheduledWorkflowCommand without defining a new class?
7 replies
CC#
Created by Ownix on 8/2/2023 in #help
❔ Is there a pattern for having a single collection of different object types?
@TeBeClone Can you fork the fiddle and show me? Or are you saying its as simple as: Before:
public class ScheduledWorkflowCommand
// ...
public class ScheduledWorkflowCommand
// ...
after
public class ScheduledWorkflowCommand : WorkflowCommand
// ...
public class ScheduledWorkflowCommand : WorkflowCommand
// ...
7 replies
CC#
Created by Ownix on 7/23/2023 in #help
❔ Argument 1: cannot convert from 'Ardalis.Result.Result' to 'TResponse'
12 replies
CC#
Created by Ownix on 7/23/2023 in #help
❔ Argument 1: cannot convert from 'Ardalis.Result.Result' to 'TResponse'
Constraint says TResponse is Result. state.SetHandled takes TResponse. Compiler is still confused.
12 replies
CC#
Created by Ownix on 7/23/2023 in #help
❔ Argument 1: cannot convert from 'Ardalis.Result.Result' to 'TResponse'
12 replies
CC#
Created by Ownix on 7/23/2023 in #help
❔ Argument 1: cannot convert from 'Ardalis.Result.Result' to 'TResponse'
okay so casting it to... itself worked. Still don't understand it though. state.SetHandled((TResponse)translatedResponse) https://dotnetfiddle.net/OJrjUD
12 replies
CC#
Created by Ownix on 7/23/2023 in #help
❔ Argument 1: cannot convert from 'Ardalis.Result.Result' to 'TResponse'
Yeah theres a dotfiddle link @feast107
12 replies