#development

1 messages · Page 1767 of 1

slender thistle
#

Aha, type 2 is something I'm curious about. I got my crap to work with type 1 so that's nice

quartz kindle
#

?

cinder patio
#

About me BlobThonk

clear marlin
#

yes

latent heron
#

This isn't a meme channel

sudden geyser
#

you'd be surprised

lusty quest
#

people who think json is a database is not really a meme, its just missing knowledge or ignorance

old cliff
#

Has anyone made an open source tcp clustering/sharding system for djs yet?

proven lantern
#

i just started seeing this in my logs. did something change that requires oauth now?

smoky kestrel
#

i am facing some error who can help

earnest phoenix
#

package.json engine thingy

cinder patio
#

it comes with the lib...

quartz kindle
#

its not "clustering"

#

in the sense of running multiple shards per process

#

but there are several, such as kurasuta, and more

old cliff
#

I meant that it has over tcp broadcast and eval stuff

next rain
#

Would this be the place to look for any bot developers to help me out and develop something for me?

proven lantern
old cliff
next rain
proven lantern
old cliff
#

Not here

#

This channel is for developers to help developers

cinder patio
quartz kindle
old cliff
#

I meant TCP

quartz kindle
#

but there are many tcp libs that you can use to make your own broadcasteval

old cliff
#

So that it could run on different machines

cinder patio
#

I don't know if there's a lib which uses TCP

quartz kindle
#

yes just use a tcp lib

old cliff
#

I should rig kurasuta to work over tcp

cinder patio
#

When are you going to need something like that tho

#

your bot must be uge

#

IPC is faster than TCP... there's no really point in doing it unless your bot is gigantic and needs a ton of resources

old cliff
#

Bro.... not for production....

#

I am not asking what I should use....

#

I am asking whether it exists

#

Increasing knowledge

#

And testing stuff

opal plank
#

isnt a websocket faster than tpc/udp?

old cliff
#

Is it?

opal plank
#

idk, im asking

#

the answer looks to be: no

#

WebSockets performs quite well, with an average round trip time of about 20 microseconds (0.02 milliseconds), but straight up TCP still beats it handily, with an average round trip time of about 2 microseconds (0.002 milliseconds), an order of magnitude less.

cinder patio
#

websockets extend the HTTP protocol

#

so they're def slower

#

out of the three udp is the fastest

#

if you're ok with loss of data then go with udp

opal plank
#

of course udc is faster

quartz kindle
#

unix domain sockets / ipc > udp > tcp > websocket > http3 > http2 > http

opal plank
#

udp is the equivalent of --yolo

#

yeet

opal plank
cinder patio
#

Interesting to see that websockets are faster than http

quartz kindle
#

both websockets and http are built on top of tcp

#

ws keeps the connection open, http doesnt

old cliff
#

Udp if you want to lose packets in deep space

cinder patio
#

I mean if you receive packets of data very frequently then udp is the go-to

ripe ember
#

Anybody know how to get rid of this issue? It’s saying 0 for it when it’s in more than 0 obviously.

cinder patio
#

show your code

#

which sets the status

ripe ember
#

Ok, one second.

old cliff
#

Thats why udp is used in multi-player gapmes

quartz kindle
#

thats why people teleport in multiplayer games

ripe ember
old cliff
#

🤣

opal plank
#

of course its 0

quartz kindle
lyric mountain
opal plank
#

ur bot isnt ready when it passes through that

quartz kindle
opal plank
ripe ember
#

Oh yeah, stupid mistake lol

lyric mountain
quartz kindle
#

its slower

ripe ember
#

I haven’t coded a bot in 2 years as I’ve had a break so I’m rusty

opal plank
#

did someone say rust, the best programming lang?

quartz kindle
#

udp is fire and forget, it doesnt care if the other side received or not, used for stuff like audio/video streams, videogames player position, etc

#

tcp needs to check and double check every single packet if it was received successfully

opal plank
#

@lyric mountainbasically this

ripe ember
old cliff
#

Its undefined

earnest phoenix
#

therefore can discord block for code?
(MINI jandev)

setInterval(() => {
    var con = client.con
    con.query(`SELECT * FROM statistics`, (err,statrow) => {
    if(err) throw err;
    statrow.forEach(function(row) {
      const targetGuild = client.guilds.cache.get(row.sid) 
      if(targetGuild) {
        var memberCountChannel = client.channels.cache.get(row.channel_id);
        if(row.type === '1'){
          channel_count = guild.members.cache.filter(member => member.user.bot).size
        } else if (row.type === '2'){
          channel_count = guild.members.cache.filter(member => !member.user.bot).size
        } else if (row.type === '3'){
          channel_count = guild.members.cache.filter(member => member.presence.status !== "offline" && !member.user.bot).size
        } else if (row.type === '4'){
          channel_count = guild.channels.cache.filter(m => m.type === `text`).size
        } else if (row.type === '5'){
          channel_count = guild.channels.cache.filter(m => m.type === `voice`).size
        } else if (row.type === '6'){
          channel_count = guild.channels.cache.size
        } else if (row.type === '7'){
          channel_count = guild.roles.cache.size
        }
        guild.channel
        memberCountChannel.setName(row.channel_name + ' ' + channel_count)
        console.log('Channel name: ' + row.channel_name + ' ' + channel_count)
      }
    })

  })
  }, 60000);  //60 sec (1 perc)
quartz kindle
#

channel.setName is 2x per 10 minutes

#

increase your interval to 300000

earnest phoenix
#

and if I write to an event pl channel deleted member join ???

quartz kindle
#

what?

earnest phoenix
#

member join event function timer 5 minutes

member leave event function timer 5 minutes

channel delete event function timer 5 minutes

channel Create event function timer 5 minutes

novel jetty
quiet spruce
quiet spruce
warped aurora
#
// ANTISPAM
const spamMap = new Map();
const maxMessage = 3;
const timeDifference = 30000;

client.on('message', async (msg) => {
if(message.member.id != ayarlar.sahip) return;

if(spamMap.has(`${msg.guild.id}_${msg.member.id}`) && spamMap.get(`${msg.guild.id}_${msg.member.id}`).messageCount >= maxMessage) {
msg.reply("spam detected!")
spamMap.delete(`${msg.guild.id}_${msg.member.id}`)
} else if(spamMap.has(`${msg.guild.id}_${msg.member.id}`) && spamMap.get(`${msg.guild.id}_${msg.member.id}`).messageCount < maxMessage) {
var newMessageCount = spamMap.get(`${msg.guild.id}_${msg.member.id}`).messageCount + 1;
  spamMap.set(`${msg.guild.id}_${msg.member.id}`, {
    lastMessage: msg,
    messageCount: newMessageCount
  })
  setTimeout(() => {
    spamMap.delete(`${msg.guild.id}_${msg.member.id}`)
  }, timeDifference)
} else {
  spamMap.set(`${msg.guild.id}_${msg.member.id}`, {
    lastMessage: msg,
    messageCount: 1
  })
  setTimeout(() => {
    spamMap.delete(`${msg.guild.id}_${msg.member.id}`)
  }, timeDifference)
}

});
// ANTISPAM
#

@summer torrent

#

can you help me?

#

it's not working

summer torrent
#

whats wrong

warped aurora
#

i don't know

quiet spruce
# novel jetty Could you help me fix it?

You can do that easliy yourself if you know what you coded and if you didn't copy it , just looks in which method do you call it and why do you want a number and why does the db return a string

opal plank
#

the amount of timeouts you'll create with this wont scale at all

slender wagon
#

like new results

quartz kindle
#

run a script every X minutes/hours to check it

opal plank
crimson vapor
opal plank
#

also replying to here before my dms

#

you shameful capibara

lyric mountain
#

I like capybaras

crimson vapor
#

I had responded here before I saw any dms

opal plank
slender wagon
slender wagon
opal plank
#

out of both answers we gave, u look at my joke first

slender wagon
#

yeah cuz that confused me lmao

opal plank
slender wagon
#

would i need a database for that? like how would i check if it has changed

opal plank
#

not necessairly, but would be good

#

having a database means u dont have to worry about your bot crashing and losing all memory

slender wagon
#

mhm i get it

#

do u know any wwe api?

opal plank
#

for something that simple i would recommend sqlite or something of the sort

#

i do not, no

slender wagon
#

oh okay

#

yeah i'll use a simple db

#

thank you

opal plank
#

np

sudden geyser
snow urchin
#

why is their some weird line under the section during and after it slides out

wintry terrace
#
app.get('/api/bots/:userID', async (req, res) => {
let userID = req.params.userID
let bots = await Bots.find({ owner: userID })
let newArray = []
bots.forEach(async b => {
let Bot = await bot.users.fetch(getID(b.botID))
newArray.push(bot)
})
res.send(newArray)
})```
#

Is there any error in this

#

it gave me an empty array

#

And i'm sure there is a data on the data base

sudden geyser
#

I don't know about the Express or MongoDB part, but I know you're passing an async forEach and expecting to immediately return

#

yet async operations take some time to complete

wintry terrace
#

i am dump

#

im push bot

#

and its

#

Bot

sudden geyser
#

For example:

let users = [];

for (const botID of bots) {
  users.push(await bot.users.fetch(...));
}

res.send(users);

Notice you've unrolled the .forEach call for a regular for of loop instead.

sterile lantern
#

if someone clicks the button once, how do i make it so it cant be clicked anymore?

#

both buttons ^

#

like if they click either one, make both buttons unclickable

eternal osprey
#

hey does anyone know how i set an interval that will run after 30 days?

#

like i was thinking about using a normal setimeout but that won't have the capabilities to hold that amount of bits.

#

as we will be talking about milliards of ms

lyric mountain
#

but anyway, the number is smaller than you think, it'll barely scratch the long capacity

#

remember epoch millis is the number of millis since 01/01/1970 and it does work nicely

#

30 days = 2592000000 millis

earnest phoenix
#

I like how I put 1+2+3 together and randomly made this:

if(!user === passive || true) return message.channel.send(`That user is in passive mode.`)
``` When I didn't even know what I was doing 🤣

*Random post.*
lyric mountain
#

so you basically made if (true) //do something

earnest phoenix
#

Yup xD

#

I didn't even know that that would work, I was just at the time puttin symbols I had in mind in the code and when I tried robbing someone using the bot it worked xD

Maaaaan, that made my life way easier.

lyric mountain
#

I didn't even know that that would work
it won't

eternal osprey
#

So it would throw an error maybe

lyric mountain
#

settimeout is in millis

eternal osprey
#

yeah

lyric mountain
#

so it's very likely long/bigint

#

but as I said, chances are that interval will never ever run

#

if you're going beyond 1 day interval, you're better using crontab or another kind of date-based scheduler

earnest phoenix
#

hi

eternal osprey
#

yeah i am already switching to node-cron, thanks kuuhaku

lyric mountain
#

np

light pumice
tame kestrel
past dove
#

Hi, any solution ?
ERROR Unhandled promise rejection: Cannot read property 'updateVoiceState' of undefined.

#

D.js 12.5.3

lyric mountain
#

you didn't even show any code

past dove
zenith terrace
#

pretty sure its voiceStateUpdate

past dove
#

Still nothing

lyric mountain
#

the issue is on manager

#

I'm very confused at what that file is supposed to be

#

there's little to no info regarding what each thing is

weary crypt
#

my bot was approved finally :p

long crow
#

Congratz

weary crypt
#

thanks :)

tame kestrel
#

in next.js does anyone know how to send a 200 response without a body?

graceful shore
#

how can i check if someone blocked the bot

lyric mountain
#

there's not much you can do aside from that

graceful shore
lyric mountain
#

just trycatch it

sudden geyser
tame kestrel
#

Cloud functions seem to just use a fork of express so I might just do that

woeful pike
tame kestrel
restive wagon
#

hey guys, could someone remind me where can i find and renew my top gg api key? i had poor practices and put it on my github repo but now im thinking of making it public so i want to renew it

zenith terrace
#

bot edit page > webhooks

restive wagon
#

found it thanks a lot

latent heron
#

@light pumice let's move our discussion to here

light pumice
#

Okay

#

I mean, I fixed it, your way worked shrug

latent heron
#

yeah, although there has to be something making it not work

#

it might be because you used <p> tags within the ifram

light pumice
#

I think TopGG just doesn't like the stuff being inside the iFrame

latent heron
#

usually you keep it as just raw text

light pumice
#

That's what the support person told me to do

latent heron
#

and the website should automatically format the text for you

#

in the event that the iframe does not work

light pumice
#

Alright

#

Well thanks for the help blobThanks

latent heron
#

all good, cheers

torn crag
#

anyone know why buttons aren't working? (as in they dont show up, i know the way im sending it isnt efficent but i want to just make sure i get buttons working)

import Discord from 'discord.js';
import Buttons from 'discord-buttons';
// const topPlayers-Teams = require('../resources/modules/getTopData.module.ts');

exports.config = {
    'name': 'leaderboard',
    'description': 'Displays top Players and top Teams.',
    'usage': 'leaderboard',
    'aliases': ['topplayers', 'topteams'],
    'alias_str': 'topplayers, topteams',
    'category': 'Game'
}

exports.run = async (client: any, message: any) => {
    let buttons: any = Buttons(client);
    let button_plr: Buttons.MessageButton = new Buttons.MessageButton()
    .setStyle('blurple')
    .setLabel('Show Top Players')
    .setID('top_plr')

    let button_team: Buttons.MessageButton = new Buttons.MessageButton()
    .setStyle('blurple')
    .setLabel('Show Top Teams')
    .setID('top_team')

    message.channel.send({
    buttons: [
      button_plr, button_team
    ],
    content: 'hello world'
    });
}
onyx zealot
#

ok

prime mist
torn crag
#

thats what i did

#

earlier

#

and its the same thing either way

prime mist
#

Looks like you aren't setting it up properly. From the README:

const discord = require('discord.js'); //Define the discord.js module
const client = new discord.Client(); //Creating discord.js client (constructor)
const disbut = require('discord-buttons')(client);
crimson vapor
#

I wonder why discord-buttons decided not to make it a constructor

lament rock
#

Idk. They even made it similar to the Embed Builder

#

could've just extended the client class

crimson vapor
#

their readme isnt even correct lmao

lament rock
#

LMAO

#

I'd just install the button PR to the main lib

#

but I have my own lib with component support

sudden geyser
crimson vapor
#

doing that shit is dumb tho

sudden geyser
#

The require(...)() pattern? That's normal.

lament rock
#

That's not normal

crimson vapor
#

how does that work for ts?

sudden geyser
#

I'd say it is. It means you exported a function.

crimson vapor
#

its not really a good thing to do

sudden geyser
#

sounds like preference

crimson vapor
#

yeah, I like my code to make sense and look clean

#

OH

#

I see

#

yeah no this is super stupid

lament rock
#
interface exported {
  new (...args: Array<any>) => ClassDef;
}
crimson vapor
#

they are making it prone to newbie devs fucking shit up

#

someone is gonna accidentally put it in a command

#

and end up with the max listeners for 'INTERACTION_CREATE'

sudden geyser
#

doubt that's the reason but more of a side effect

lament rock
#

idk why they shoved components on interaction create

crimson vapor
#

well

#

they are interacting

lament rock
#

They're really pushing forward the idea that they want devs to use slash commands

prime mist
crimson vapor
#

slash commands are nice tho

lament rock
#

A certified mod of the ddevs server said they were talking about making GUILD_MESSAGES a privileged intent

sudden geyser
#

disgusting

crimson vapor
#

I can't wait for an impressive lib to figure out how to make them typed super well

#

thats fair tbh

#

messages are user content and therefore probably should be privileged

#

plus slash commands are super user-friendly

prime mist
lament rock
#

Not really. Imagine if EVERY bot moved to slash commands. A ton of bots could be in a singular guild. A user can be in 100 guilds max. I heard somewhere they already capped or are capping guilds to 100 bots. That's 1000 bots. If all 1000 bots register global commands...

sudden geyser
#

while we're at it let's remove all these traditional things like event emitters and use cooler models like reactive

prime mist
sudden geyser
#

yay!

lament rock
#

axios Blehh

crimson vapor
crimson vapor
prime mist
#

Will never be a mainstream client, but if you like functional / reactive programming is it nice 🙂

crimson vapor
#

yea but it looks like it works well for what its meant to do

#

not like djs where its a jack of all trades but best at none

sudden geyser
#

everyone here sleeping on functional & reactive

lament rock
#

if you're confident in it, could pr to discord docs to add to list of clients

prime mist
#

Hah, I looked through the djs source code and was kinda horrified at how complex it is.

crimson vapor
#

yea its super over-engineered

sudden geyser
#

nah it's just about right

prime mist
#

Well, you got to send all the first-time programmers somewhere right?

crimson vapor
#

yep

#

does discord-buttons work with djs light

#

I think it might not

prime mist
#

Probably relies on all the caching to work 🤷

crimson vapor
#

I mean they both use prototype stuff to work

lament rock
#

I'm working on making a Discord.js-like cacheless wrapper around updated versions of modular libs :)
https://github.com/AmandaDiscord/ThunderStorm

working on an update currently to make folder structure and class names similar to Discord.js

GitHub

A layer between WeatherStack and Discord.js client code bases - AmandaDiscord/ThunderStorm

crimson vapor
#

the library which you only upload the dist to?

lament rock
#

Only downside is that a ton of assumptions are made

#

The src is on another branch

crimson vapor
#

oh

#

hidden

#

wait no

#

smart

lament rock
#

just so it's not included in install

crimson vapor
#

npm i AmandaDiscord/ThunderStorm

#

smart

prime mist
#

All those classes for embeds etc. don't really make sense in typescript, at least to my eyes.

Plain objects + type safety goes a long way.

crimson vapor
#

hmmm

#

I see what you mean

#

imo it looks nicer tho

#

alright I must sleep

#

good night peoples

lament rock
#

You have to understand that TypeScript isn't meant to be similar to clangs or other strictly typed languages as it still compiles down to JavaScript which is not type safe at all and shouldn't have other language conformities shoved onto it

prime mist
#

Yes, if your type is any in Typescript, then you are open to errors still.

But otherwise, even if it compiles to Javascript, the type safety still applies.

lament rock
#

That's a large assumption as the npm registry doesn't just consist of type safe libraries. Type safe devs so to speak are at the mercy of other devs that don't practice type safety

#

The end user might also not practice type safety

#

the run time also isn't type safe

#

arbitrary statements can be made to easily break this

prime mist
#

Not too sure what you are trying to say, but if the interface is wrong - at run-time or compile-time - then it will break things.

crimson vapor
#

I wouldn’t say typescript is type safe, more like type “safer”

lament rock
#

Trying to force JS to be like another language just won't work out is what I'm trying to get at

#

functional languages are great and all, but JS isn't that

prime mist
#

Oh, functional programming isn't really a language based thing though.

And javascript just so happens to be pretty good at it, with good anonymous function support, closures, passing functions as references etc.

lament rock
#

The basis around functional is mutating the state of something through other functions and returning similar or different values. JS isn't optimized for that

prime mist
#

If anything, OOP is kind of a hack in Javascript. Classes were added not that long ago.

lament rock
#

Classes have always been in JS. later ES revisions actually added the eye candy which is current class syntax

sudden geyser
#

Even if it's not the language's native paradigm, it doesn't mean it can't be used efficiently. I'm designing an immutable database yet still using Postgres.

lament rock
#

You could use it like it. I just don't think you should be using JS like that considering other languages exist for that

#

and would get better performance if it was optimized for that syntax

prime mist
#

Prototype chains are not really classes. They can be used in a similar way, sure.

lament rock
#

Classes now still use the prototype chain

#

Just fancy Object instantiation

stark abyss
#
const app = express();
app.get('/register', async (req, res) => {
    return console.log(req.body)
})

fetching http://localhost:3000/register?email=124&password=xyz
(I have no experience with this stuff) I don't know what I am doing wrong but req.body is {}

lament rock
#

You'd be looking for the query string. Not body. Body is non standard for get requests anyways

stark abyss
#

so req.query?

lament rock
#

try it and see

stark abyss
#

ah yes it did work thank you

elfin vale
#

How do slash commands work in discord js? Is there any example?

zenith terrace
#

im pretty sure there's tutorials somewhere

white lichen
#

can 2 host server things host one discord bot

#

like 2 people logged into an account

marble juniper
zenith terrace
#

packages probably ^

marble juniper
#

and v13 will only come out once specific pull requests are merged

#

lol

#

which can take a while

zenith terrace
#

3 years later

#

still waiting

marble juniper
#

lol

#

I suspect it like a few months later

#

july earliest id say

near stratus
#

@elfin vale
Till now I guess this is the best example I can give without using any third party libraries

BotClient.on('ready', () => {
    BotClient.api.applications(BotClient.user.id).guilds("YOUR_GUILD_ID").commands.post({
        data: {
            name: "aaa",
            description: "Get a random AAA",
            options: [{
		        name: "big_aaa",
				description: "Get a big AAA",
				type: 1,
				required: false
			}, {
				name: "smol_aaa",
				description: "Get a smol aaa",
				type: 1,
				required: false
			}]
        }
    }).then(console.log).catch(console.log);
});

BotClient.ws.on('INTERACTION_CREATE', async (interaction) => {
    BotClient.api.interactions(interaction.id, interaction.token).callback.post({data: {
        type: 4,
        data: {
            content: 'AAA'
        }
    }}).catch(console.log);
});
elfin vale
#

ok. ty!

marble juniper
#

also look at this

#

useful too

#

also if you really want to add slash commands just use the master branch as it has like built in support without you having to do this code

#

its just easier to use in general

clear marlin
#

Link sends a Link

rocky hearth
#

for nested functions like this

function A() {
  function B() {}
}
A()

Does the function B gets redeclared everytime we call the function A?

summer acorn
#

quick question, does the discord api allow for making the audit logs show the user who executed the command rather than the bot?

#

like for example, the user runs a ban command, the audit log would show that the user were the one banning rather than the bot

formal pulsar
#

i have a event client.on("messageReactionAdd" with control conditions if I try to send a message to the user if(condition) return user.send("") it gives me an error on the bot prefix variable

#

this is line 102 let prefixnowget1 = await dbo.collection("info").findOne({ guildid: ${msg.guild.id} })

clear marlin
#

Can a discord bot support a webgl game? ThinkFast

white lichen
clear marlin
#

What do you mean by 2 host server things?

lusty quest
#

yes

clear marlin
#

Vps?

#

Or a cloud host

lusty quest
lusty quest
#

but its quite complicated

clear marlin
#

I'm thinking of making a rpg game with webgl, no idea of how to embed it onto discord lmao

prime mist
lusty quest
clear marlin
#

I'll have to research a lot lol

lusty quest
#

like you have to render it on your server and use some sort of stream

clear marlin
#

Mhm, get your point

lusty quest
#

when someone can do this in minecraft you will figure out how to do it in discord

clear marlin
#

Haha, well the thing is gba has a node sdk

prime mist
#

You could probably render an image on the server, and tell the embed to update the image every x amount of time? Will need more research, because that would be a last resort 🙂

clear marlin
#

So it isn't hard to actually embed it onto discord

lusty quest
#

and this will get you ratelimited really fast

clear marlin
#

Probably will get you rate limited yeah

lusty quest
#

this is why streaming it is probably the better way

prime mist
#

What is the rate limit on message updates? Do they have a seperate bucket?

clear marlin
#

Too many requests, since we are changing frames every ms or so

prime mist
#

Oh if you are aiming for more than 1fps, then this wouldn't work lol.

prime mist
#

Can you embed a twitch stream or something?

clear marlin
#

Twitch has its own discord integration, that lets you stream a twitch live stream link on discord

earnest phoenix
#

Hello, I am doing a role reaction and I am using MYSQL to manage my data.
When I add a reaction role to a message, the bot checks before if on the configured message id there is not already the chosen emote registered.

So I want to add an emote that it is not saved for this message, but my bot returns a sentence saying that there is the emote in the database (after checking it is not).

Currently I am trying to add the emote 🙏, so I have this:

const getEmote = Discord.Util.parseEmoji(emote);
const convertEmote = parse(getEmote.name, { 
    assetType: "png" 
});
            
options.database.query(`SELECT * FROM reactionRole WHERE guild_id = '${message.guild.id}' AND channel = '${channel}' AND message = '${messageID}' AND emote = '${convertEmote[0].text}'`, function(err, resultCheck){
    if(resultCheck.length) return message.channel.send(options.emojis.no + message.language.get("REACTIONROLE_ADD_ALREADY")
        .replace("{emote}", convertEmote[0].text)
        .replace("{channel}", `<#${channel}>`)
        .replace("{messageID}", messageID));```

For information, I use the parse function of a module to retrieve each valid emote (that's for another thing) but I log what it returned and its return the emote that I want to add and that  'it is not in the database.
The channel and messageID variable are retrieved from a table: this is the identifier of the channel and of the message on which the bot must add the reaction role.

So I don't understand, on some emote (which is not in the database) it works, ie it adds well since it cannot find the emote.  Now, on some, when there is none in the database, it says that there is already the emote in it when no .. How can I do that?  Thanks to the person who will help me
lusty quest
#

there are probably ways to embed streams, like ive mentioned earlyer someone made a Gameboy emulator with a discord bot

clear marlin
lusty quest
#

saving emotes in mysql overall is funky, iirc you need to change the charset

clear marlin
#

Already said, gba has a node sdk

#

It won't be that hard

lusty quest
#

yes but you still have to stream it somehow to discord

#

the backend stuff is not the hard one i would say

#

the frontend is annoying

clear marlin
#

Mhm, there must be people with gba bots on GitHub lol

#

I'm sceptical though

earnest phoenix
#

ok

lusty quest
earnest phoenix
#

this is ; utf8mb4_general_ci

lusty quest
#

sounds right then

#

did you checked with stuff like mysql workbench if its correctly stored?

earnest phoenix
#

yes yes..

#

but i use utf8mb4_unicode_ci so?

lusty quest
#

its utf8mb4 charset

earnest phoenix
#

yes

lusty quest
#

also the emotes doesnt show up as ? in the column?

earnest phoenix
#

no

#

correct emotes

lusty quest
#

then i guess something fucks around with your query

#

did you tried to test it by forcing an emoji?

#

also only unicode emoji can work

earnest phoenix
#

i will check with an emoji bug

#

Ok i’v found

#

the emote 🙏 returned a blank case in mysql

lusty quest
#

yes bcs its probably not unicode

earnest phoenix
#

What type of characters should I use to add all the emojis I want?

#

utf8mb4_bin ?

#

or other

lusty quest
#

if you want all of them you have to use the string discord uses

earnest phoenix
#

Mh ok thx bro 😎

lusty quest
#

wait folded hands is unicode

#

but just use the string discord uses, will give you way less headache

earnest phoenix
#

excuse me bro @lusty quest

#

i test somes emojis in mysql

#

and all returned blank case

lusty quest
#

then the way you store them doesnt work

earnest phoenix
#

so i think I have to change the type of characters

lusty quest
#

just use the strings like i suggested, bcs you have to expect that the enduser are dumb AF and cant figure out what a unicode emoji is

earnest phoenix
#

thx a lo

#

t

white lichen
#
let embed = new Discord.RichEmbed()
                    ^

ReferenceError: Discord is not defined```
i defined discord but this still happens
lusty quest
#

const exampleEmbed = new Discord.MessageEmbed()thats for V12

white lichen
#

is it

#

thanks

white lichen
#

it says discord is not defined

#

so i wouldnt say that would matter

lusty quest
#

how did you define discord?

white lichen
#

i use a command handler

#

i put the ping thing into a file

lusty quest
#

yea thats wrong

white lichen
#

and defined discord in index.js

earnest phoenix
#

define Discord directly in your command file

lusty quest
#

you need something from the module, not from the client class

white lichen
#

ill try defining it in the file

earnest phoenix
#

and ?

formal pulsar
#

i know

lusty quest
#

make sure that its defined

white lichen
#

it works now

#

thanks

formal pulsar
#

wait

lusty quest
formal pulsar
#

the id is saved in database

lusty quest
#

yes but you want to find the id

#

so you have to supply the id

formal pulsar
#

that and a search query

lusty quest
#

wait

#

your entire query is weird

#

why is it in ${}?

#

${} is for parsing the stuff into a string

#

but you need to give them a value

formal pulsar
#

then

#

let prefixnowget1 = await dbo.collection("info").findOne({ "guildid": msg.guild.id })

lusty quest
#

does it work?

formal pulsar
#

i try now

#

oh

#

it seems not give error now

prime mist
#

Hmm, looking at your code, you shouldn't be creating a MongoClient for every message reaction 🙂

woeful pike
#

mongodb client already takes care of pooling for you, one is enough

formal pulsar
#

if I remove it from that file then it doesn't work anymore

prime mist
#

Change:

module.exports= async (client) => {

To something like:

module.exports= async (client, db) => {

Then pass the mongo client instance from your command handler or something.

formal pulsar
#

I said it doesn't work

woeful pike
#

you're not even using the db parameter lol

formal pulsar
#

const db = await MongoClient.connect(``, { useNewUrlParser: true, useUnifiedTopology: true })
const dbo = db.db('simply-ticket');

near stratus
#

f autocorrect

lusty quest
near stratus
#

like sharding partitioning clustering blah blah blah ......

#

You'll only need them when the bot is like in 25000+ guilds I guess

lusty quest
#

2500 not 25000

slender thistle
#

heh

exotic lotus
#

Hn

prime mist
white lichen
#

is sharding like 2 clients signed into one bot account

lusty quest
#

also having it running on mutiple processes makes sense at a certain point

prime mist
#

I think it has internal sharding as well, but I don't use d.js.

prime mist
#

That is actually reasonably accurate 🙂

earnest phoenix
#

hello

#

i need one help

#

in node

#

any one help me pls

#

any one help me

slender thistle
#

State your issue right away

earnest phoenix
#

i need add song link in my bot embed

#

my bot is music

clear marlin
#

don't ask to ask

earnest phoenix
#

wht you mean

clear marlin
#

nothing

#

lol

near stratus
quartz kindle
#

you can get up to 2500 with 1 shard

near stratus
#

for 25000 you need separate machine

quartz kindle
#

internal sharding gets you multiple shards

quartz kindle
lusty quest
#

you dont need necessary a new machine for 25000 guilds

quartz kindle
#

plenty of bots with 100k+ run on a single machine

lusty quest
#

thats like 10 shards

near stratus
quartz kindle
#

internal sharding does that for you

near stratus
near stratus
quartz kindle
#

that can easily run a million guilds

quartz kindle
#

my bad

near stratus
#

Brain said: you'll need 2500 guilds when you should use separate machine
I said 2500 is what's internal sharding should cover

quartz kindle
#

i mean

#

technically the term "sharding" means having multiple websocket connections, and officially, discord requires sharding at 2500, so brain was not wrong

#

"sharding" doesnt necessarily mean multi-machine

stiff lynx
#

when the discord.js v13?

quartz kindle
#

@stiff lynx^

earnest phoenix
#

"We do an extensive amount of trolling"

quartz kindle
#

they're adding so much bullshit to their codebase its getting harder and harder to work with

#

i think v13 will be the last djs-light version

umbral zealot
#

To be fair they also have to contend with discord itself fucking with the API constantly on no set schedule and adding features consistently at random, often with no warning.

quartz kindle
#

they dont really care about the timing of discord updates since they themselves take 2 years to actually release them

#

but yeah the changes to the api itself often fuck up the direction they want to take the lib

umbral zealot
#

yeah I remember that v12 took 2 years do'nt worry

#

Does any JS lib already have interactions and buttons though? That's the good question

quartz kindle
#

pretty sure detritus does

#

maybe eris? idk i dont follow them

umbral zealot
#

Does it now? @opal plank does detritus have / commands and buttons released on a stable version?

quartz kindle
#

maybe not in a stable version, but djs doesnt even have it on master, its still a pending PR

smoky kestrel
#

how to solve --> npm ci
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/runner/test/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/runner/test/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/runner/.npm/_logs/2021-05-31T10_07_29_043Z-debug.log
exit status 254

Repl.it: Package operation failed.

quartz kindle
#

you dont have a package.json file

#

create one with npm init

smoky kestrel
#

i have it

#

in repl it

quartz kindle
#

imo the biggest issue with discord.js is that they didnt think it was enough to be simply a "wrapper", they basically became an entire trancoding/translation unit for the discord api

#

kinda like an API ORM

quartz kindle
smoky kestrel
#

what is internal/fs/utils.js:269
throw err;
^

Error: ENOENT: no such file or directory, open '/home/runner/test/index.js'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object.<anonymous> (/run_dir/interp.js:195:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/home/runner/test/index.js'
}

quartz kindle
#

now its missing an index.js

smoky kestrel
#

oh i will change server.js into index.js

stiff lynx
#

discod.js

prime mist
quartz kindle
#

fs.readdir

stiff lynx
#

const command_files=fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
Here fs.readdir instead of fs.readdirSync?

quartz kindle
#

no, you have to use both

#

i mean

#

you have to use readdir in combination with readfile

#

as many readdirs as you have folders

#

doesnt matter if readdir or readdirSync

#

fs.readdirSync(folder).forEach(subfolder => fs.readdirSync(folder/subfolder).forEach(file => {}))

smoky kestrel
#

Error: Cannot find module './handler/console'
Require stack:

  • /home/runner/res/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at /home/runner/res/index.js:15:46
    at Array.forEach (<anonymous>)
    at /home/runner/res/index.js:15:33
    at Script.runInContext (vm.js:130:18)
    at Object.<anonymous> (/run_dir/interp.js:209:20)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)Hint: hit control+c anytime to enter REPL.
near stratus
earnest phoenix
#

That package is just bloated

near stratus
umbral zealot
earnest phoenix
#

Just use raw API requests pepeFacepalm

near stratus
quartz kindle
#

in 2 years

slender thistle
earnest phoenix
#

Says like v13 will ever come out

slender thistle
#

So MEMBER_UPDATE is wrong 02derp

near stratus
earnest phoenix
#

Its not hard if you know what you're doing

quartz kindle
slender thistle
#

All this time my shit didn't work and I wasn't even aware LMAO

quartz kindle
#

rip

earnest phoenix
#

F

near stratus
quartz kindle
near stratus
#

Google is shitting on me somehow

slender thistle
#

They're called message components in Discord docs

earnest phoenix
quartz kindle
#

fek

slender thistle
#

oopsies

near stratus
#

...

quartz kindle
#

lmfao

earnest phoenix
earnest phoenix
#

Wish components allowed you to set any color as style tho

quartz kindle
#

theres a feature request for that on their github

near stratus
#

Somehow it keeps repeating itself

#

lol

earnest phoenix
#

lol

earnest phoenix
lusty quest
#

yes

#

its a easteregg for years

quartz kindle
#

i've never seen it before hahah

lusty quest
#

found another one, just spam the attach file button

earnest phoenix
#

wait, you can add buttons on messages now?

#

yes

#

RIP pagination embeds with reactions

lusty quest
#

yes, for d.js you need some external package until they add it to d.js

earnest phoenix
#

Or just... Use raw API requests in d.js with <Client>.api

undone swallow
#

but the buttons look clunky imo rn

near stratus
undone swallow
#

Hey guys, I needed some inputs, I am implementing a banking system and was wondering the best way to implement simple/compound interest on the deposited amount

Library Discord.js
Database MongoDB atlas

earnest phoenix
earnest phoenix
#

I literally see no reason why buttons should be removed, there are 7 reasons why buttons are better than reactions

#

Reasons why buttons are better than reactions:
1- No spamming API to add reactions one by one
2- Can be disabled
3- No permissions required
4- Can have different styles
5- Supports labels
6- Supports up to 25 buttons which reactions doesn't
7- Buttons can use emojis from any guild even if they're not in that guild

quartz kindle
#

my bot's help command has 66 pages

earnest phoenix
earnest phoenix
quartz kindle
lunar pollen
#

Does buttons support animated emojis now?

earnest phoenix
south sinew
near stratus
#

we should be able to use custom colors

#

like embeds

quartz kindle
#

ask in the feature request issue

south sinew
quartz kindle
south sinew
#

you're putting text on a color

#

white text on a yellow button is hard to read

#

obviously there's a simple solution, just add text color as an option

#

not sure if they'd do that though

#

¯\_(ツ)_/¯

near stratus
south sinew
#

true

earnest phoenix
#

rickroll idea: white text on white color and tell the user to double click the button on mobile

near stratus
#

Now that I think about it
How about White text on white background on light theme ?

quartz kindle
#

jenious

south sinew
#

smort

earnest phoenix
#

i love how they still havent fixed $browser, $device and $os in the identify payload. It's still your library name

stiff lynx
smoky kestrel
zenith terrace
earnest phoenix
#

if react can detect class prop, why tf doesn't it change it to className on it's own?

zenith terrace
earnest phoenix
earnest phoenix
earnest phoenix
#

bruh.js

#

see not working

#

sad

umbral zealot
undone swallow
# earnest phoenix math?

I have to handle time ;-; so i am wondering if I should add the time stamp to a collection, database or something else

#

Currently I was thinking to add a timestamp on deposit, and calculate interest when they try to withdraw or check their current value.
Is there a better way to do it? what is less costly?

stiff lynx
heady sable
#

Anyone know rabbitmq?

lyric mountain
#

25 buttons?? that's a fkin 5x5 grid

zenith terrace
stiff lynx
#

LOL

#

66 pages of 1 command

zenith terrace
old cliff
#

Minesweeper

zenith terrace
#

well

#

that

lyric mountain
#

also this

7- Buttons can use emojis from any guild even if they're not in that guild

how?

zenith terrace
#

no clue

#

only used the discord-buttons package once for testing

lyric mountain
#

I'm still waiting for them to come to jda

#

then I'll adapt my lib to use them

earnest phoenix
lyric mountain
#

damn, that's a big limit

earnest phoenix
lyric mountain
#

I imagine chip or rythm will add a fkin remixer table with them

lyric mountain
earnest phoenix
rocky hearth
#

is buttons available in the master branch?

zenith terrace
earnest phoenix
#

Smh, I use the raw API requests

marsh bluff
#

Is it useful writing unit tests for discord bots?

vivid fulcrum
#

useful, sure

#

but very tasking

#

and almost impossible

#

mocking the API is extremely difficult

slender thistle
#

test in prod ftw

vivid fulcrum
#

and then delete all channels in dapi

slender thistle
#

🤣

vivid fulcrum
opal plank
#

not only that, cake already added the dropdown support

umbral zealot
#

But is it in a stable release?

opal plank
umbral zealot
#

or some dev branch?

opal plank
#

those 2 are in main branch, this action menu is in dev

umbral zealot
#

Ah so released yesterday, right?

opal plank
#

the action menu?

#

or what?

umbral zealot
#

the buttons and slash commands

opal plank
#

no, they have been out for quite some time

umbral zealot
#

You're definitely much, much better than an entire team of devs doing d.js then dogekek2

opal plank
#

im trying to find the specif link, cuz i definitively was bragging about it at once point

vivid fulcrum
#

djs got lost in their own design

#

almost every third commit follows different paradigms

opal plank
#

@umbral zealot found it

vivid fulcrum
#

that's why prs go through thousands of revisions before actually getting merged tbh

opal plank
#

31 january

#

thats when cake started adding slash commands

#

d.js still doesnt have it on stable right?

umbral zealot
#

nope they just had a functional PR like a few days back. It's as if they waited for the buttons to actually be live to start coding.

earnest phoenix
#

as docs werent enough

opal plank
#

buttons were only announced for us 2 months ago

umbral zealot
#

Not sure - I mean, we all knew buttons were coming, they literally had a release date planned, and they were documented. I know.

opal plank
#

and only opened to private test a month ago

#

and even then, they warned it might not be final

umbral zealot
#

People were doing buttons with raw API requests within like 5 minutes of release, and d.js is like "yo guys they just came out give us time to make the PR!"

opal plank
#

it seems a really dumb idea to push slash commands based on something so unstable

opal plank
#

and they still havent done it

umbral zealot
#

yeah I'm aware.

#

v12 took 2 years, I'm not expecting v13 in a timely manner.

#

Hell, v12 took 2 years and they didnt even have new features to contend with, really.

opal plank
#

for example, im about to request access to dropdowns so i can try them out. mark my words, djs wont even touch it within the next 3 months

umbral zealot
#

I should start making a detritus guide, videos, and push the entire AIG community to use it. dogekek2

opal plank
#

that would be greatly appreciated tbh

umbral zealot
#

you ready for 2000+ users? lol

opal plank
#

always been

umbral zealot
#

I'll consider it.

#

I'd have to try it first.

opal plank
#

cake is now work on the docs btw

umbral zealot
#

docs aren't guides though

opal plank
#

correct, but the docs are what kills detritus

#

they are tsdocs generated

umbral zealot
#

had the same problem with discord.js back in the day

#

that's why I made the guide

opal plank
#

you might need to heavily rely on me, dan or evan to answer detritus related questions

#

though if you're used to digging through code, you wont have much need in all honesty

#

as tim said

#

detritus is TOO organized

#

so its easy to find stuff in the code

umbral zealot
#

considering I had started working on my own lib at one point, digging through the source and docs shouldn't be much of a problem

opal plank
#

then you absolutely fine

#

i can still answer any low/intermediate questions just fine from the back of my head, but when it gets to very specifics, i might need to ask cake or evan

quartz kindle
opal plank
#

no balls

#

do it

quartz kindle
#

i will if i add more features

#

but i dont feel like it

opal plank
#

nobody will ever know

quartz kindle
#

lel

slender thistle
quartz kindle
#

it was never wrong?

#

:^)

slender thistle
near stratus
quartz kindle
#

we do

opal plank
#

DETRITUS

slender thistle
#

Detritus

opal plank
near stratus
#

Was thinking about Eris tbh

quartz kindle
#

detritus, eris, discord-rose, djs-light, make-ur-own-lib

umbral zealot
quartz kindle
#

klasa/klasa-core but idk if they still active

near stratus
umbral zealot
slender thistle
#

Probably. You saying it's more of a devs issue?

long crow
opal plank
#

oh my, already got customers?

long crow
#

Js and stuff

umbral zealot
slender thistle
#

Heh

umbral zealot
#

Abal left the team, Hydra was left standing there and isn't... driven enough to lead a proper team.

quartz kindle
#

does hydra even do anything anymore?

#

isnt he just a symbolic owner?

umbral zealot
#

mostly stand there and look pretty

#

And I'm not saying he's not knowledgeable or smart, because.. he is both those things. That's not where he's lacking.

quartz kindle
#

tbh i understand him

#

i feel the same way about many things i do

#

it starts being too much of a chore when a lot of people start using it

#

it becomes a responsibility you were not prepared for when you started

#

and that turns you off

umbral zealot
#

yeah but he has a full team of devs behind him that are helping with stuff, so... why is nothing getting done? Mostly, I'd say, because there's way too much interpersonal drama involved.

opal plank
#

must be nice to wake up to 31 github issues with people asking why my bot no online? i put bot.login() but no work, hilp

umbral zealot
#

When you have a team half-made of people that call each other's code "shit", what are you gonna do?

opal plank
#

actually, let me check their github issue page

prime mist
opal plank
#

okay now this is just sad

quartz kindle
#

didnt it start as a fork of djs?

opal plank
#

they have bug dating back 2019 still open

umbral zealot
#

Because Abal made discord.js (was a big part of the team?) originally (version 6 was his last version I think?) and then.. as far as I can tell, there was a disagreement on the direction to take, abal went "meh fuck it", created Eris, and discord.js kept on being maintained by hydrabolt. So yeah... they're similar in their origin.

#

I started doing bots right after abal left, just before eris came out.

prime mist
#

Oh yeah, the code style is similar in its roots. Make sense.

near stratus
quartz kindle
#

i still want to make my own lib but meh its too tiring

#

i have tons of ideas for it tho

umbral zealot
#

Just work with ERwin then. lol

near stratus
#

Like ERwin will ever stop advertising Detritus

opal plank
#

ERwin tells u to come to Detritus

prime mist
long crow
#

detritus documentation make me bleed my eyes

opal plank
#

cake is fixing it

#

slowly but surely

long crow
#

Looking to it

quartz kindle
opal plank
#

would be better if someone helped him with pr's

quartz kindle
#

and yeah the rest api is a mess

opal plank
#

cake went a step further, he uses the WHOLE api on rest, not only bot's

umbral zealot
#

I remember trying to parse incoming payloads. and then the issue was that the payloads from discord were fucking shit.

opal plank
#

so theoretically i think you can even load a user on detritus

opal plank
#

yeah, he has everything in detritus

umbral zealot
#

author_id here and userid here and author.user.id there or whatever the hell it was.

quartz kindle
#

lel

cinder patio
#

If I were to make a discord lib I'd use an already existing gateaway / http implementation. Nothing stops you from using detritus-client and detritus-socket and writing your own top-level interfaces around those

quartz kindle
#

i guess, except if you want to implement some low-level changes

opal plank
#

detritus being said so many times today makes me happy

quartz kindle
#

i dont like detritus's zlib implementation tbh

opal plank
#

think it can be improved?

quartz kindle
#

yes

opal plank
#

cough coughc tell cake

#

pr

#

cough cough

quartz kindle
#

cough cough fast-zlib cough cough

opal plank
#

here

quartz kindle
opal plank
#

just leave a message

#

and get free internet points

quartz kindle
#

eh i dont like arguing with other people's way of doing things

opal plank
#

just suggest checking fast-zlib

rocky hearth
prime mist
#

Anyone compared zlib with ETF extensively?

opal plank
#

otherwise i'll take credit for the suggestion

quartz kindle
quartz kindle
opal plank
#

welp, my internet points now

quartz kindle
#

my internet points are bigger as the maker of the lib

#

:^)

umbral zealot
opal plank
#

@quartz kindle gib fast zlib link plez

umbral zealot
#

can you show the code that's triggering this?

quartz kindle
opal plank
#

frick u

#

@quartz kindle

#

i now wash my hands

quartz kindle
#

lel

smoky kestrel
umbral zealot
#

Alright, show the code that's triggering this error.

daring willow
#

Tarded hi
can the bot send error message to the chat when it doesnt have some permission

smoky kestrel
#

thats too much big code with sub directories

daring willow
umbral zealot
daring willow
#

im nob in big code

smoky kestrel
#

coz not my own some one give me to repair it

#

but i didnt find the source or error

umbral zealot
#

That's nice.

#

Show us /home/runner/mrvenom/index.js:119:66

#

index.js, line 119.

smoky kestrel
#

ok

umbral zealot
#

Why were you given this to fix if you have no idea how to debug code or read error messages?

smoky kestrel
#

bot.on('message', async message => {
let prefix;
try {
let fetched = await db.fetch(prefix_${message.guild.id});
if (fetched == null) {
prefix = PREFIX
} else {
prefix = fetched
}
} catch (e) {
console.log(e)
};

#

from 116 to 125

umbral zealot
#

Well, uhm... ok, so, message.guild will be undefined in DMs.

smoky kestrel
#

wdym

umbral zealot
#

you're trying to get something from the dB using message.guild.id but it's undefined. so it says it cannot read property id of message.guild that's undefined because it's a DM.

smoky kestrel
#

so what should id

#

do*

umbral zealot
#

Uhm... learn javascript, if you want to pretend you can fix someone's bot?

#

Or tell the person that asked you to fix this that you don't know how to fix it because you do'nt understand the code.

hidden gyro
#

why my bot was declined?

umbral zealot
smoky kestrel
#

i cant cause of my laptop

umbral zealot
#

you can't tell the person that you don't know how to code... because you're on a laptop?

#

But you're talking to me now... waitWhat

smoky kestrel
#

lol i know how to code but i think something is missing he didnt send me everything waitWhat

umbral zealot
#

I think it's pretty clear if you're confused about my above answer, you don't... know how to code. Not enough to be fixing people's bots, that's for sure.

smoky kestrel
umbral zealot
#

No... the error isn't relevant to the PC you're running this on.

#

This error is about the fact that message.guild is undefined, which happens in DMs.

smoky kestrel
#

may be

lyric mountain
#

jokes on you, I code on a laptop

opal plank
#

jokes on u, me too

umbral zealot
#

Joke's on you, I build entire websites for work using laptops.

stiff lynx
#

const Discord = module.require("discord.js");

module.exports = {
name: "unlock",
aliases: ['sblocca'],
permissions: ['MANAGE_CHANNELS'],
description: "Locks a Channel",

async execute(client, message, args, Discord, cmd){

 let channel = message.channel;

message.channel.overwritePermissions([
{
id: message.guild.id,
null : ['SEND_MESSAGES'],
},
],);
const embed = new Discord.MessageEmbed()
.setTitle("Aggiornamento del Canale")
.setDescription(🔓 ${message.channel} è stato sbloccato da <@${message.author.id}>)
.setColor("GREEN");
await message.channel.send(embed);
message.delete();
}
}

smoky kestrel
#

yes it send evryting on inbox

stiff lynx
#

idk y this command reset the channel rules

cinder patio
#

and you call yourself a MERN stack developer 😛

opal plank
#

only thing i call myself is : "idiot"

pale vessel
#

and alcoholic

umbral zealot
opal plank
#

that oo

#

shouldnt it be deny/allow?

smoky kestrel
#

he just said to repair it

umbral zealot
earnest phoenix
#

well my fix thingy is if its dm just send a response

prime mist
stiff lynx
umbral zealot
opal plank
#

im always against allowing bots to dm or be dm'd unless its privacy stuff

earnest phoenix
opal plank
earnest phoenix
#

idk-

stiff lynx
opal plank
#

i personally dislike the thought of bots dm'ing people

umbral zealot
prime mist
smoky kestrel
#

why you guys are approving data grabber bot

umbral zealot
#

What are you talking about

smoky kestrel
#

like dark core bot

#

with 0 permission and prefix

umbral zealot
opal plank
smoky kestrel
#

see

opal plank
#

yikes

umbral zealot
opal plank
#

thats just a random bot thats trying to scam u

#

not related to us

umbral zealot
#

I think you're maybe confusing the company called "Discord" with the company called "top.gg" . They're not the same thing.

#

As made pretty obvious by their different name and domains.

smoky kestrel
#

no i thought you aproved it too on top.gg lol i didnt even check it there :/

#

k nvm

umbral zealot
#

The checkmark is verification by discord, it has absolutely nothing to do with top.gg

smoky kestrel
#

ok thank you 😦 i will report it

cinder patio
#

Now we only need a "checkbox" interaction

opal plank
#

makes me wonder how that bot even verified by asking for servers

stiff lynx
opal plank
#

at least i can sleep well know knowing discord has the owner's id's/passport with those scam bots

umbral zealot
umbral zealot
#

compare what's in the docs and what you wrote

#

deny is not null. replace. the. word.

rocky hearth
#

I'm trying to find an example code for slash command in detritus?
How do I get started?

opal plank
#

cake should have a slashclient soon, he was talking about it a few times

cinder patio
#

oop

opal plank
#

for now its prob a good idea to use the raw event

cinder patio
#

or just wait

rocky hearth
#

when it would be out?

opal plank
#

good question

rocky hearth
#

ik 😅

cinder patio
#

I dunno, and I also dunno why cake wouldn't make that a pr which anyone can see and contribute to

umbral zealot
#

pffffft slash commands aren't out yet? I thought Detritus was feature-complete 😛

opal plank
#

cake is making a whole slashClient

#

theres already support for slash commands

cinder patio
#

I'm going to eat him

opal plank
#

you can reply() directly to the interaction

#

just like he has commandClient, he's building a whole wrapper for slashClients

#

or so it would seem

cinder patio
#

Yeah but I assume you'll have to create your own handler which goes through all the files and adds each command

opal plank
rocky hearth
#

yeah, but that is very basic thing, I wish detritus would implement it. We just need to give the commands folder path

long marsh
#

Anyone here try to make a bot using discordgo?

opal plank
#

like i said, detritus already has support for it, just doesnt have a commandClient for slash commands yet

umbral zealot
#

ah I see

cinder patio
#

no point if they're already working on it

long marsh
#

That’s not the point. I believe they’re making a reference to the fact that they said it would be “easy”. If it’s so easy, where’s your PR? Kinda thing

opal plank