dainis
dainis
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by dainis on 10/30/2024 in #djs-questions
A collector that collects messages from a predetermined channel
const collectorFilter = m => m.content.includes('discord');
const collector = interaction.channel.createMessageCollector({ filter: collectorFilter, time: 15_000 });

collector.on('collect', m => {
console.log(`Collected ${m.content}`);
});

collector.on('end', collected => {
console.log(`Collected ${collected.size} items`);
});
const collectorFilter = m => m.content.includes('discord');
const collector = interaction.channel.createMessageCollector({ filter: collectorFilter, time: 15_000 });

collector.on('collect', m => {
console.log(`Collected ${m.content}`);
});

collector.on('end', collected => {
console.log(`Collected ${collected.size} items`);
});
I used this code as a basis, however I had no idea how to make it work in a specific channel without the need of it being triggered by a slash command (I put it in the events folder aswell). Here's how far i've gone
const { Events } = require("discord.js");

module.exports = {
name: Events.ClientReady,
once: false,
execute(client) {
const channel = client.channels.fetch("1221529963761500160");

const collector = channel.createMessageCollector({
time: 15_000,
});

collector.on("collect", (m) => {
console.log(`Collected ${m.content}`);
});

collector.on("end", (collected) => {
console.log(`Collected ${collected.size} items`);
});
},
};
const { Events } = require("discord.js");

module.exports = {
name: Events.ClientReady,
once: false,
execute(client) {
const channel = client.channels.fetch("1221529963761500160");

const collector = channel.createMessageCollector({
time: 15_000,
});

collector.on("collect", (m) => {
console.log(`Collected ${m.content}`);
});

collector.on("end", (collected) => {
console.log(`Collected ${collected.size} items`);
});
},
};
4 replies
DIAdiscord.js - Imagine an app
Created by dainis on 8/22/2024 in #djs-questions
Can't run the guide lightly modified bot
[WARNING] The command at /home/dainis/bot/commands/utility/info.js is missing a required "data" or "execute" property.
Ready! Logged in as xxxxxxxxxx
[WARNING] The command at /home/dainis/bot/commands/utility/info.js is missing a required "data" or "execute" property.
Ready! Logged in as xxxxxxxxxx
I have no idea what am I supposed to do.
64 replies
BROBattleBit Remastered Official
Created by dainis on 4/27/2024 in #help-support
Anyone else having issues launching the game on GNU/Linux?
3 months ago I could easily launch the game using Proton, now I have tried EVERYTHING but it did not work. The only way I could get something working is using Lutris, but when launching the game it complains about not being able to connect to steam. Anyone has a fix or a way to perhaps link the lutris instance to steam or something? I use endeavour os (arch based) with X11.
35 replies