yibuh
yibuh
Explore posts from servers
RRailway
Created by yibuh on 2/12/2024 in #✋|help
Migrating project
Hi, I've recently upgraded from Hobby to Pro plan and a new team was created for my account. Can I move my personal projects to this team?
12 replies
SIASapphire - Imagine a framework
Created by yibuh on 11/25/2023 in #discordjs-support
Detect when new message is a reply to another one
Hey! Is it possible to detect when a message is a reply? I have a schedules system that automatically replies to you when you tag a member that's not currently available. I'd like the bot to differentiate between explicit mentions (i.e. @member) and message replies, which technically include a mention too. Thanks!
6 replies
RRailway
Created by yibuh on 11/23/2023 in #✋|help
Deploys stuck initializing
Hey! My deploys are stuck on the "initializing" stage
9 replies
SIASapphire - Imagine a framework
Created by yibuh on 11/16/2023 in #sapphire-support
Listeners and Handlers not registering interactions/events
Hey! After the latest release my bot is not responding to any interactions or events. Slash commands, buttons, modals, everything stopped working. I already made the necessary changes to my files
17 replies
RRailway
Created by yibuh on 11/16/2023 in #✋|help
Discord bot deployment failing
My bot deployment is failing, but I don't really understand why. It was working today and I only made some small modifications:






#11 [stage-0 7/10] COPY . /app/.

#11 DONE 0.1s



#12 [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build



#12 1.376 npm

WARN config production Use `--omit=dev` instead.

#12 1.497

#12 1.497 > [email protected] build

#12 1.497 > tsc

#12 1.497



#12 17.52 src/interaction-handlers/modals/embed-edit/embed-edit.ts:14:15 - error TS2345: Argument of type 'PieceContext<keyof StoreRegistryEntries>' is not assignable to parameter of type 'LoaderContext'.

#12 17.52 Types of property 'store' are incompatible.

#12 17.52 Type 'ListenerStore | ArgumentStore | CommandStore | InteractionHandlerStore | PreconditionStore' is not assignable to type 'InteractionHandlerStore'.

#12 17.52 Property 'run' is missing in type 'ListenerStore' but required in type 'InteractionHandlerStore'.

#12 17.52

#12 17.52 14 super(ctx, {

#12 17.52 ~~~

#12 17.52



#12 17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5

#12 17.52 2372 run(interaction: Interaction): Promise<boolean>;

#12 17.52 ~~~

#12 17.52 'run' is declared here.

#12 17.52

#12 17.52

#12 17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14

#12 17.52



#12 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2

-----

> [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build:

17.52 ~~~

17.52

17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5

17.52 2372 run(interaction: Interaction): Promise<boolean>;

17.52 ~~~

17.52 'run' is declared here.

17.52

17.52

17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14

17.52

-----



Dockerfile:24

-------------------

22 | # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build

25 |

26 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2



Error: Docker build failed






#11 [stage-0 7/10] COPY . /app/.

#11 DONE 0.1s



#12 [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build



#12 1.376 npm

WARN config production Use `--omit=dev` instead.

#12 1.497

#12 1.497 > [email protected] build

#12 1.497 > tsc

#12 1.497



#12 17.52 src/interaction-handlers/modals/embed-edit/embed-edit.ts:14:15 - error TS2345: Argument of type 'PieceContext<keyof StoreRegistryEntries>' is not assignable to parameter of type 'LoaderContext'.

#12 17.52 Types of property 'store' are incompatible.

#12 17.52 Type 'ListenerStore | ArgumentStore | CommandStore | InteractionHandlerStore | PreconditionStore' is not assignable to type 'InteractionHandlerStore'.

#12 17.52 Property 'run' is missing in type 'ListenerStore' but required in type 'InteractionHandlerStore'.

#12 17.52

#12 17.52 14 super(ctx, {

#12 17.52 ~~~

#12 17.52



#12 17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5

#12 17.52 2372 run(interaction: Interaction): Promise<boolean>;

#12 17.52 ~~~

#12 17.52 'run' is declared here.

#12 17.52

#12 17.52

#12 17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14

#12 17.52



#12 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2

-----

> [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build:

17.52 ~~~

17.52

17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5

17.52 2372 run(interaction: Interaction): Promise<boolean>;

17.52 ~~~

17.52 'run' is declared here.

17.52

17.52

17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14

17.52

-----



Dockerfile:24

-------------------

22 | # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build

25 |

26 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2



Error: Docker build failed
11 replies
SIASapphire - Imagine a framework
Created by yibuh on 11/16/2023 in #sapphire-support
Deployment failing
Hey! My sapphire deployment is failing but I don't really know why. It is giving me some errors on the framework's code apparently:






#11 [stage-0 7/10] COPY . /app/.

#11 DONE 0.1s



#12 [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build



#12 1.376 npm

WARN config production Use `--omit=dev` instead.

#12 1.497

#12 1.497 > [email protected] build

#12 1.497 > tsc

#12 1.497



#12 17.52 src/interaction-handlers/modals/embed-edit/embed-edit.ts:14:15 - error TS2345: Argument of type 'PieceContext<keyof StoreRegistryEntries>' is not assignable to parameter of type 'LoaderContext'.

#12 17.52 Types of property 'store' are incompatible.

#12 17.52 Type 'ListenerStore | ArgumentStore | CommandStore | InteractionHandlerStore | PreconditionStore' is not assignable to type 'InteractionHandlerStore'.

#12 17.52 Property 'run' is missing in type 'ListenerStore' but required in type 'InteractionHandlerStore'.

#12 17.52

#12 17.52 14 super(ctx, {

#12 17.52 ~~~

#12 17.52



#12 17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5

#12 17.52 2372 run(interaction: Interaction): Promise<boolean>;

#12 17.52 ~~~

#12 17.52 'run' is declared here.

#12 17.52

#12 17.52

#12 17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14

#12 17.52



#12 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2

-----

> [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build:

17.52 ~~~

17.52

17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5

17.52 2372 run(interaction: Interaction): Promise<boolean>;

17.52 ~~~

17.52 'run' is declared here.

17.52

17.52

17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14

17.52

-----



Dockerfile:24

-------------------

22 | # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build

25 |

26 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2



Error: Docker build failed






#11 [stage-0 7/10] COPY . /app/.

#11 DONE 0.1s



#12 [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build



#12 1.376 npm

WARN config production Use `--omit=dev` instead.

#12 1.497

#12 1.497 > [email protected] build

#12 1.497 > tsc

#12 1.497



#12 17.52 src/interaction-handlers/modals/embed-edit/embed-edit.ts:14:15 - error TS2345: Argument of type 'PieceContext<keyof StoreRegistryEntries>' is not assignable to parameter of type 'LoaderContext'.

#12 17.52 Types of property 'store' are incompatible.

#12 17.52 Type 'ListenerStore | ArgumentStore | CommandStore | InteractionHandlerStore | PreconditionStore' is not assignable to type 'InteractionHandlerStore'.

#12 17.52 Property 'run' is missing in type 'ListenerStore' but required in type 'InteractionHandlerStore'.

#12 17.52

#12 17.52 14 super(ctx, {

#12 17.52 ~~~

#12 17.52



#12 17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5

#12 17.52 2372 run(interaction: Interaction): Promise<boolean>;

#12 17.52 ~~~

#12 17.52 'run' is declared here.

#12 17.52

#12 17.52

#12 17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14

#12 17.52



#12 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2

-----

> [stage-0 8/10] RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build:

17.52 ~~~

17.52

17.52 node_modules/@sapphire/framework/dist/index.d.ts:2372:5

17.52 2372 run(interaction: Interaction): Promise<boolean>;

17.52 ~~~

17.52 'run' is declared here.

17.52

17.52

17.52 Found 1 error in src/interaction-handlers/modals/embed-edit/embed-edit.ts:14

17.52

-----



Dockerfile:24

-------------------

22 | # build phase

23 | COPY . /app/.

24 | >>> RUN --mount=type=cache,id=s/d9a66794-7b01-4dc8-8c5b-149b515e8a09-node_modules/cache,target=/app/node_modules/.cache npm run build

25 |

26 |

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2



Error: Docker build failed
Any help is appreciated 🙂 Thanks in advance
8 replies
RRailway
Created by yibuh on 11/14/2023 in #✋|help
Use python on a Node.js project
Hey! I am trying to use some libraries on my Discord bot that require Python's latest version to be installed. How can I define a Python version to use on my Node.js project? Thank you in advance 🙂
9 replies
RRailway
Created by yibuh on 11/10/2023 in #✋|help
Write files on Railway
Hey! I'd like to know if it's possible to write files to the server on Railway? I am hosting a Discord bot and would like to store channel transcripts on my Railway server.
9 replies
SIASapphire - Imagine a framework
Created by yibuh on 11/6/2023 in #sapphire-support
Handle secondary bots from main
Hey! I am working on a meetings system that would require my bot to join meetings and record transcriptions. As we have several meetings and sometimes they overlap, I'd like to handle two to three secondary bots that would join the meeting when others are occupied. Is it possible to handle this logic in sapphire? How could that be done? Thank you!
8 replies
DIAdiscord.js - Imagine an app
Created by yibuh on 11/4/2023 in #djs-questions
Set voice channel topic
Is it possible to set the text that goes below the voice channels' names using discord.js?
3 replies
SIASapphire - Imagine a framework
Created by yibuh on 10/29/2023 in #sapphire-support
The inferred type of 'parse' cannot be named without a reference to...
Hey! I am getting this error while trying to create an interaction handler: The inferred type of 'parse' cannot be named without a reference to '.pnpm/@[email protected]/node_modules/@sapphire/result'. This is likely not portable. A type annotation is necessary. This is my code:
import { InteractionHandler, InteractionHandlerTypes, PieceContext } from "@sapphire/framework";
import { ModalSubmitInteraction } from "discord.js";
import { ApplyOptions } from "@sapphire/decorators";

export class EmbedEditModal extends InteractionHandler {
public constructor(ctx: PieceContext, options: InteractionHandler.Options) {
super(ctx, {
...options,
interactionHandlerType: InteractionHandlerTypes.ModalSubmit
})
}

public override parse(interaction: ModalSubmitInteraction) {
return interaction.customId.startsWith('embed-edit') ? this.some() : this.none()
}
}
import { InteractionHandler, InteractionHandlerTypes, PieceContext } from "@sapphire/framework";
import { ModalSubmitInteraction } from "discord.js";
import { ApplyOptions } from "@sapphire/decorators";

export class EmbedEditModal extends InteractionHandler {
public constructor(ctx: PieceContext, options: InteractionHandler.Options) {
super(ctx, {
...options,
interactionHandlerType: InteractionHandlerTypes.ModalSubmit
})
}

public override parse(interaction: ModalSubmitInteraction) {
return interaction.customId.startsWith('embed-edit') ? this.some() : this.none()
}
}
8 replies
SIASapphire - Imagine a framework
Created by yibuh on 9/28/2023 in #sapphire-support
AutoComplete subcommand name/id
Hello! I'm trying to use autocomplete interactions for my subcommands. Both subcommands (start & end) have the same autocomplete option called 'event'. I'd like to be able to identify which subcommand is being used to use a different logic for each one. Is this possible? Currently I am only able to access the command's information but not the subcommands.
5 replies
SIASapphire - Imagine a framework
Created by yibuh on 6/24/2023 in #sapphire-support
__importStar is not defined
Hey! I am using a star import in my bot but whenever I try to run the dev script, it gives me the following error:
const dotenv = __importStar(require("dotenv"));
ReferenceError: __importStar is not defined
const dotenv = __importStar(require("dotenv"));
ReferenceError: __importStar is not defined
I guess it is more a TypeScript related issue. This is the line that's causing it:
import * as dotenv from 'dotenv';
import * as dotenv from 'dotenv';
3 replies
SIASapphire - Imagine a framework
Created by yibuh on 6/15/2023 in #sapphire-support
Creating a button handler
Hey! I would like to know if there is a way to create a button handler using Sapphire. I would like to read all files from a folder called "buttons" and store the data inside my container. I'd then check if there is an existing button with the given interaction id inside my container and if there is, I'd run the execute function. I came up with some code but can't manage to get it working. I'll attach it down below. Thanks in advance for all the help 🙂
8 replies
SIASapphire - Imagine a framework
Created by yibuh on 6/13/2023 in #sapphire-support
New to Sapphire! Where should I start?
Hey! I've been developing Discord bots with discord.js for over two years now and I've recently made the jump to Sapphire and TypeScript. Where should I start? I am reading the guide to get an idea of how the framework works but I'd really appreciate any tips or guidance on what my next steps should be. Thank you very much in advance 🫶
4 replies
DIAdiscord.js - Imagine an app
Created by yibuh on 8/6/2022 in #djs-questions
Add empty value to embed field
Is it possible to have an embed field with only a title and no value? I'd like to use hyperlinks & inline fields on an embed. Thank you 🙂
3 replies
DIAdiscord.js - Imagine an app
Created by yibuh on 8/4/2022 in #djs-questions
Access Discord.js documentation
Is it possible to access discord.js documentation for autocomplete interactions? I'd like to make a bot similar to d.js docs
7 replies
DIAdiscord.js - Imagine an app
Created by yibuh on 7/29/2022 in #djs-questions
Has the end() method been removed from InteractionCollector?
As the title says, I am getting an error saying collector.end() is not a function when running collector.end() my collector declaration:
const collector = message.channel.createMessageComponentCollector({
time: 60000,
});
const collector = message.channel.createMessageComponentCollector({
time: 60000,
});
4 replies
DIAdiscord.js - Imagine an app
Created by yibuh on 7/29/2022 in #djs-questions
Was Util removed from discord.js?
Getting undefined when trying to import Util from discord.js
4 replies
DIAdiscord.js - Imagine an app
Created by yibuh on 7/27/2022 in #djs-questions
get EmbedBuilder from Embed object
is it possible to get an embed builder instance from an embed object? I am trying to edit an already sent message's embed using the EmbedBuilder methods. Example:
const previousEmbed = interaction.message.embeds[0]

interaction.message.edit({
embeds: [previousEmbed.setTitle('Test')]
})
const previousEmbed = interaction.message.embeds[0]

interaction.message.edit({
embeds: [previousEmbed.setTitle('Test')]
})
18 replies