ManuelMaccou | Mosaic
Explore posts from serversRRailway
β’Created by ManuelMaccou | Mosaic on 2/13/2024 in #βο½help
Trying to confirm my volume implementation
I noticed that when making changes to how data is stored in volumes, then redeploying, my data was lost. From looking at other posts with similar issues, it seems the problem might be my mount path in the Railway settings, but I'm hoping to get confirmation of that.
Currently, my mount path is /data
This is the code for saving the data:
28 replies
RRailway
β’Created by ManuelMaccou | Mosaic on 2/10/2024 in #βο½help
How do I find the project directory?
This feels like a stupid question but I cant figure it out. I'm trying to append records to a CSV when the user does certain actions. I have the folder made called "data". Using the code below, in test on my local machine, the files are written successfully. And the path in the logs makes sense. But in production, I get an error saying the path doesnt exist. My root folder is "gogh-shopping". But the path where it tries to find the "data" folder is starting with "app". Is that expected? How do I point to the correct directory in prod?
Here is my code:
6 replies
RRailway
β’Created by ManuelMaccou | Mosaic on 1/27/2024 in #βο½help
Is railway down? Getting "upstream connect error"
I'm not able to log in via github or reach the community site to report an issue.
Full error showing browser:
upstream connect error or disconnect/reset before headers. reset reason: connection timeout
In console:
Failed to load resource: the server responded with a status of 503 ()
12 replies
RRailway
β’Created by ManuelMaccou | Mosaic on 11/9/2023 in #βο½help
Error: "version `GLIBC_2.36' not found" with Playwright
37 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by ManuelMaccou | Mosaic on 8/1/2023 in #djs-questions
getting partials for reactions when only ID is guaranteed
I just saw this in the d.js docs
WARNING Partial data is only ever guaranteed to contain an ID! Do not assume any property or method to work when dealing with a partial structure!How for partial reactions, how do we make that work when regular emojis dont have an ID (unless I'm mistaken about that)
11 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by ManuelMaccou | Mosaic on 6/5/2023 in #djs-questions
How to completely removing an emoji, not just the reactions
In my app, the bot automatically adds different emoji reactions when a user creates a message. Afte a certain amount of time, I want that emoji removed. Not just the reactions, but the entire emoji. So far, I've only been able to figure out how to remove the reactions, which result in the default reaction count of 1, but the emoji is still there. Is there a way to remove the emoji entirely? Thanks all
5 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by ManuelMaccou | Mosaic on 6/2/2023 in #djs-questions
Stuck trying to create a map to track votes on messages
I'm trying to allow user to upvote/downvote messages using reactions, as well remove their previous vote. I'm using a map and a map of maps to do this. The problem is that when a user reacts to a message, the map "userMessageVotes" updates correctly, but the map of maps does not.
userMessageVotes - A map of a users votes per message
messageVotes - A map of maps that has all votes from all users in a message.
2 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by ManuelMaccou | Mosaic on 5/31/2023 in #djs-questions
message.channel.parent undefined in forum channel?
I'm getting an error where message.channel.parent is undefined. My intention is to cross-check the forum channel in which a user posts to make sure it's an "allowed channel". Am I not using this correctly to identify the parent forum channel of a new thread?
13 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by ManuelMaccou | Mosaic on 4/23/2023 in #djs-questions
Trying to get the content from the parent message in a forum post
I feel a little silly asking this because it's probably obvious. In a forum channel, I'm trying to get the content of the first message that started the forum post. The name, or title, is easy with
message.channel.name
But I cant figure out how to get the content.2 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by ManuelMaccou | Mosaic on 4/9/2023 in #djs-questions
Sending messages from a forum channel to database, but unable to grab the tags
Everything is going through to my database from Discord, but I cant figure out how to grab the tags and the tag IDs. I've tried a few things...with the help of our AI overlords...but still no luck. Below is the section of the code where I try to grab the tag id
client.on('messageCreate', async (message) => {
if (message.author.bot) return;
let appliedTags = [];
if (message.channel.type === "GUILD_FORUM") {
if (message.thread) {
appliedTags = message.channel.availableTags.filter(tag => message.thread.metadata.appliedTags.includes(tag.id));
} else {
console.log("No "thread" property.");
}
}
31 replies
DIAdiscord.js - Imagine a boo! π»
β’Created by ManuelMaccou | Mosaic on 4/8/2023 in #djs-questions
How to specify the ID of a forum channel?
I have an app that sends messages to a database if they are in the pre-approved channel. I'm using the code below. This works fine when the message comes from a regular channel, but not a forum channel. Should
channel.id
be something else for forum channels?
if (allowedChannels.some(channel => channel.channel_id === message.channel.id))
5 replies