#development

1 messages ยท Page 1655 of 1

final lynx
#

whats the issue

earnest phoenix
#

The issue is your ban command right?

final lynx
#

yes

#

i sent that so you had a idea of what im working with

earnest phoenix
#

Then you can basically implement the kick and ban commands with first check for permissions

#

Using <GuildMember>#permissions#has()

final lynx
#

wait

#

this has the variables

#

this is the working script*

earnest phoenix
#

I know, i recommend using a command handler

final lynx
#

ok

#

what do you think the best way for me to make the ban script would be

earnest phoenix
final lynx
#

ok

#

thanks

#

hey

#

i looked at it

#

and how would i edit the prefix

#

i dont see where i would change it

#

or do i need to add my own

#

adding my own wouldnt be very hard, but i dont want to mess it up

earnest phoenix
#

They're just requiring it from a json file, to keep the prefix and the token hidden

final lynx
#

ok

#

ill add this

#

brb

opal plank
#

@final lynx do you want custom prefix per server or just change prefix overall?

final lynx
#

well

#

a custom prefix per server would be rly cool

#

but for now

opal plank
#

how much js do you know?

final lynx
#

i added the command handler

crimson vapor
#

solutions for per server prefix require a sort of database

final lynx
earnest phoenix
#

They're not really looking for custom prefixes

final lynx
opal plank
#

im kinda tempted to slap them with detritus

earnest phoenix
crimson vapor
opal plank
#

but idk if it would be the wisest since detritus docs arent nowhere as easy as d.js

crimson vapor
#

Erwin how long have you been using the lib for?

final lynx
#

s

#

m

#

h

opal plank
#

probably 2 months

crimson vapor
#

ok so I have a question, do you think you can answer it?

opal plank
#

if you wondering dusk, detritus is a discord lib for js/ts like discord.js

earnest phoenix
#

pepehmmNoBG The lib is really nice

opal plank
#

most likely yes

final lynx
#

ik, i looked it up B)))

crimson vapor
#

why do commands not work without the roles cached?

opal plank
#

cuz you probably requesting permissions and since the users arent cached, it cant check

final lynx
#

also

#

rq

opal plank
#

so it probably always returns false

crimson vapor
#

perhaps

#

bit of an oversight

#

imo

opal plank
#

not really

#

if you dont have permissions, how you're going to check?

#

you need a bitfield

crimson vapor
#

no I agree with that

final lynx
#

if i wanted to make a custom prefix for every server, how would i do that, building off of this

opal plank
#

it gives you the option if you arent going to use it

crimson vapor
#

but for a command that doesn't have permissions

#

I understand why it happens

opal plank
#

then you wouldnt pass the function to check for permissions

crimson vapor
#

oh?

final lynx
#

like a cmd that would change the prefix

#

maybe something like

opal plank
#
onPermissionCehck(perms) {

return true;
} ```
that should do the trick
crimson vapor
#

ok test one sec

opal plank
#

i mispelled btw

final lynx
#

const prefix = "n/" (message.reply)

opal plank
#

also what permisions are you passing?

final lynx
#

or am i stupid

cunning gorge
#

I'm JS, how do I make it so my reaction embed auto delete after a certain timeout
RN I have:

    const collector = msg.createReactionCollector(filter, { time: 60 * 1000 })

But I would like to make it also delete the reaction embed when it ends

crimson vapor
#

there is no onPermissionsCheck typed

opal plank
#

there is, its internal

#

actually

#

sorry my bad i was thinking for the prefix

final lynx
#

-_-

#

how would i make the prefix

#

its prob simple

#

but im a noobie

opal plank
#

actually

opal plank
#

are you passing an array of permissions?

#

for both client and user?

final lynx
proven lantern
#

this is most of my code for getting a guild prefix

crimson vapor
#

me? im not touching anything

pale vessel
final lynx
#

๐Ÿ˜ฎ

opal plank
#

send what you got so far

crimson vapor
#
commandClient.add({
  name: 'ping',
  run: context => {
    return context.reply({
      embed: {
        title: 'DETRITUS',
        description: `\`\`\`js\n${inspect(Object.entries(process.memoryUsage()).reduce(
          (T, [K, V]) => ((T[K] = (V / 1024 ** 2).toFixed(1) + 'MB'), T),
          {} as any,
        ))}\`\`\``,
      },
    });
  },
});```
final lynx
#

this is what i have to far

final lynx
#

blurred my token

opal plank
#
commandClient.add({
  name: 'ping',  
  permissions: [],
  permissionsClient: [],
  run: context => {
    return context.reply({
      embed: {
        title: 'DETRITUS',
        description: `\`\`\`js\n${inspect(Object.entries(process.memoryUsage()).reduce(
          (T, [K, V]) => ((T[K] = (V / 1024 ** 2).toFixed(1) + 'MB'), T),
          {} as any,
        ))}\`\`\``,
      },
    });
  },
});```
try that @crimson vapor
crimson vapor
pale vessel
#

million used as any bru

opal plank
final lynx
#

oh

final lynx
#

well rip

opal plank
#

this is a different and better lib than discord.js

final lynx
#

n a n i

crimson vapor
#

different

final lynx
#

wait

#

i forgot why i was here lol

#

i needed a ban cmd

#

well

crimson vapor
#

member.ban()

pale vessel
#

ezpz

crimson vapor
#

@opal plank no go

opal plank
#

what exactly did you disable?

#

roles?

crimson vapor
#
import { CommandClient } from 'detritus-client';

const commandClient = new CommandClient(token, {
  cache: {
    roles: { enabled: false },
  },
  shardCount: 1,
  prefix: '?',
});

commandClient.add({
  name: 'ping',
  permissions: [],
  permissionsClient: [],
  run: context => {
    return context.reply({
      embed: {
        title: 'DETRITUS',
        description: `\`\`\`js\n${inspect(Object.entries(process.memoryUsage()).reduce(
          (T, [K, V]) => ((T[K] = (V / 1024 ** 2).toFixed(1) + 'MB'), T),
          {} as any,
        ))}\`\`\``,
      },
    });
  },
});

commandClient.run();```
#

code

opal plank
#

im waiting for cake's response too, ask him on the channel as well

#

of course you arent in the server

#

-.-

crimson vapor
#

ยฏ_(ใƒ„)_/ยฏ

#

I doubt ill use it for more than a test bot

#

maybe ill write a joke bot

opal plank
crimson vapor
#

get a feel for the lib

cunning gorge
#

Question, does the timeout refresh each time you react again?

    const collector = msg.createReactionCollector(filter, { time: 10 * 1000 })
#

there's more code obviously

crimson vapor
#

time is how long it lasts

cunning gorge
#

So no matter how many reactions it'll still end right?

#

Is there a way to make it refresh with every new reaction

earnest phoenix
#

<Collector>.resetTimer()

umbral zealot
#

you'd have to recreate it yourself

#

oh! no nevermind me then

cunning gorge
#

Ohh thanks

crimson vapor
#

handle function pog

opal plank
#

million instantly joined and saw me bitching about something in the lib

#

nice first impression mmulu

crimson vapor
#

ive not read any chat

opal plank
#

good

#

keep it that way

#

perfect lib, no issues

#

move along

crimson vapor
final lynx
#

do any of you have a discord.js ban command i could have B))

crimson vapor
#

sec

#

waitno

#

not djs

#

d-rose

opal plank
final lynx
#

rip

#

im a small child who needs nutrition

opal plank
#

if you want something that basic, use discord bot maker or something

#

we teach real coding here

crimson vapor
#
  ban: {
    command: 'ban',
    usage: 'ban <member>',
    description: 'ban a member',
    aliases: ['b'],
    permissions: ['banMembers'],
    botPermissions: ['banMembers'],
    category: 'moderation',
    exec: async (ctx) => {
      const ID = (ctx.args[0] || '').replace(/[<@!>]/g, '')
      const member = ctx.worker.members.get(ctx.guild.id).get(ID) || await ctx.worker.api.members.get(ctx.guild.id, ID).catch(e => null);

      if (!member) throw new NonFatalError(getLang('CMD_BAN_NO_MEMBER'))

      const guildRoles = ctx.worker.guildRoles.get(ctx.guild.id).array();

      const userRole = guildRoles.filter(r => ctx.member.roles.includes(r.id)).map(r => r.position).reduce((a, r) => r > a ? r : a, 0)
      const memberRole = guildRoles.filter(r => member.roles.includes(r.id)).map(r => r.position).reduce((a, r) => r > a ? r : a, 0)
      const myRole = guildRoles.filter(r => ctx.worker.members.get(ctx.guild.id).get(ctx.worker.user.id).roles.includes(r.id)).map(r => r.position).reduce((a, r) => r > a ? r : a, 0)

      if (memberRole >= userRole) throw new NonFatalError(getLang('CMD_BAN_NO_YOU'))
      if (myRole <= memberRole) throw new NonFatalError(getLang('CMD_BAN_NO_ME'))

      await ctx.worker.api.members.ban(ctx.guild.id, member.user.id);

      await ctx.embed
        .description(getLang('CMD_BAN_SUCCESS', member.user.id))
        .color(ORANGE)
        .send()
    }
  },```
opal plank
crimson vapor
#

spoonfeed activated

final lynx
#

n a n i

opal plank
#

and million goes and instantly spoonfeeds them

crimson vapor
#

not djs

opal plank
crimson vapor
#

woah

solemn latch
#

๐Ÿ‘€

crimson vapor
#

ok I see how it is

#

๐Ÿ˜ข

#

wtf

opal plank
#

atmods spoonfeed!

crimson vapor
#

there

earnest phoenix
#

I see spoon-feed!??!??

crimson vapor
#

oh its sad

#

right

solemn latch
#

someone should tell a mod!

opal plank
#

nono

earnest phoenix
opal plank
#

this is a serious issue

#

raise it to a community manager

crimson vapor
#

if you @ mods

#

only 3 will show up

solemn latch
#

lol

#

where are all the mods ๐Ÿ‘€

crimson vapor
#

I ate them

solemn latch
earnest phoenix
#

Mods are watching anime

solemn latch
#

oh yeah

#

its weeb time

final lynx
#

GUYS

#

I JUST NOTICED SOMETHING

#

it all makes since now...

crimson vapor
#

@opal plank js Error: Cannot send messages in this channel at CommandClient.handle (/home/million/discord/shit-test/node_modules/detritus-client/lib/commandclient.js:466:27) yea, I think its permissions errors

restive lily
#
@bot.event()
async def on_member_join(ctx, user):
    embed = discord.Embed(colour = discord.Colour.blue(), description=f"{user.mention}({user.id}) joined ImpactRP at {user.joined_at.strftime("%a %b %d %Y at %I:%M %p")}")
    channel = discord.utils.get(ctx.guild.text_channels, id=821454429264936991)
    await channel.send(embed=embed)```
https://cdn.discordapp.com/attachments/780220433043423273/821606262970122271/unknown.png
Help please if you could.
crimson vapor
#

@opal plank POG I "FIXED" IT

opal plank
#

wht did you change?

crimson vapor
#

its a permissions issue

#

so responseOptional: true

slender thistle
#

f"{'haha'}"

restive lily
slender thistle
#

Aye

#

Try it

restive lily
#

idk what a coro is

pale vessel
#

coroutine?

restive lily
#

i will go to the google for an answer

opal plank
crimson vapor
#

so

#

results after about a min

restive lily
slender thistle
#

Oh

#

Remove the parentheses from the decorator

pale vessel
#

it's kinda weird, commands need them but events don't?

crimson vapor
#
ERIS
{
  rss: '48.9MB',
  heapTotal: '13.6MB',
  heapUsed: '12.1MB',
  external: '1.4MB',
  arrayBuffers: '0.1MB'
}
DISCORD.JS
{
  rss: '59.9MB',
  heapTotal: '24.4MB',
  heapUsed: '16.2MB',
  external: '1.5MB',
  arrayBuffers: '0.1MB'
}
DISCORD.JS-LIGHT
{
  rss: '48.5MB',
  heapTotal: '13.7MB',
  heapUsed: '12.5MB',
  external: '1.5MB',
  arrayBuffers: '0.1MB'
}
DETRITUS
{
  rss: '44.7MB',
  heapTotal: '10.4MB',
  heapUsed: '8.7MB',
  external: '1.7MB',
  arrayBuffers: '0.3MB'
}
DISCORD-ROSE
{
  rss: '50.3MB',
  heapTotal: '7.1MB',
  heapUsed: '5.3MB',
  external: '1.4MB',
  arrayBuffers: '0.1MB'
}``` DETRITUS, taking a lead over all but drose, which is no surprise as djs has no cache config and idk how to config eris
slender thistle
#

Correct

crimson vapor
#

and drose has no cache

restive lily
# slender thistle Remove the parentheses from the decorator

I may have done it wrong

@bot.event()
async def on_member_join(ctx, user):
    embed = discord.Embed(colour = discord.Colour.blue(), description=f"{user.mention}({user.id}) joined ImpactRP at {user.joined_at.strftime'%a %b %d %Y at %I:%M %p'}")```
slender thistle
#

You

restive lily
#

I am stupid, yes

slender thistle
#

Not those parentheses

#

In the decor

#

The @bot.event() thingy

#

Not in the strftime function

restive lily
#

i feel stupid, but tysm

slender thistle
#

np

opal plank
crimson vapor
opal plank
crimson vapor
#

LOL

opal plank
#

DETRITUS, taking a lead over all but drose, which is no surprise as djs has no cache config and idk how to config eris

crimson vapor
#

detritus is using less reserved but more heap than drose with essentially the same caching options

#

that was 5 mins in

#

gonna do 15 now

#

drose is stable-ish at 5mb heapUsed, the lowest of them all
Detritus is the lowest rss
djs and eris basically already lost

#

djsl is trying

#

just doesn't have the caching capabilities tho

restive lily
#

special ed me again here, i tried user and memberand ctx. in front of each of them and vice versa I usually use user, so idk, same error when I use user, but says user, I even change it in the async line to what I use, so its not that.

opal plank
#

let @quartz kindle be the judge

#

good morning tim

#

read above

#

also you smelly

crimson vapor
#

yeah Tim needs to check

#

c'mon Tim, you know your job

opal plank
#

tim has only 2 jobs, once is being a wiki slave here with answering questions and his side job is benchmarking

long crow
#

How newbie friendly are all of it?

restive lily
# slender thistle Show your code
@bot.event
async def on_member_join(ctx, member):
    embed = discord.Embed(colour = discord.Colour.blue(), description=f"{member.mention}({member.id}) joined ImpactRP at {member.joined_at.strftime('%a %b %d %Y at %I:%M %p')}")
    channel = discord.utils.get(ctx.guild.text_channels, id=821454429264936991)
    await channel.send(embed=embed)```
slender thistle
#

Remove ctx

restive lily
#

i tried with and without it

slender thistle
#

use member.guild

restive lily
#

same error

#

oh u mean in channels

restive lily
slender thistle
#

You removed ctx and saved the file, right?

restive lily
#

yes

opal plank
slender thistle
#

The function has only one parameter?

long crow
#

Yes

opal plank
#

that wasnt a yes or not question you dork

long crow
#

Sorry, wrong server

restive lily
#

correct

opal plank
river panther
#

detritus is the best no cap

opal plank
#

^^

long crow
#

I mean as an early dev with middle range of understanding javascript

river panther
#

saying detritus is not good is like saying Ferraris are shit

long crow
#

Documentation, OOP wise

slender thistle
#

Dumb shit

#

Why is it complaining about optional args

restive lily
#

idk

opal plank
#

its worth it tho

long crow
#

And detritus heavily use class? For most part, I used djs because I still lack understanding on classs

opal plank
#

kinda? not really tbh

long crow
#

This.mything etc

opal plank
#

nah

#

classes are good to use

#

but its not a requirement at all

river panther
#

wot, you guys use class?

#

i don't exdi

opal plank
#

no classes

long crow
#

Oh the usual module.exports

river panther
#

wait, what does the error event do in djs?

long crow
#

Using v8 api?

river panther
#

mhm

marble juniper
#

lol

river panther
#

oh, ok ok

marble juniper
#

so stuff like

#

missing permissions

river panther
#

oh, ok ok

#

thank

#

so if i want to

#

umm

#

like, if there is a missing permission, what do?

#

message.channel.send(error)?

crimson vapor
#

wtf bro

#

this is cringe

#

don't use my example

river panther
#

what?

#

welp i opened the docs

#

so nvm

marble juniper
restive wagon
#

hey guys need some help with my bot, im hosting it on heroku with postgres, it was working fine since i made it last year but today all of a sudden i cant connect to my postgres database, here's the log on heroku

marble juniper
#

you would need to fetch a channel and use that to send a message

#

lol

marble juniper
restive wagon
#

did they do some update and break my settings?

restive wagon
#

oh shit yea seems like its something they changed, i was scared it was something i didhttps://devcenter.heroku.com/changelog-items/2035

opal plank
#

detritus best lib confirmed

crimson vapor
#

sec

#

its not a competition because discord-rose has no caching at all

pale vessel
#

why does it take more then

opal plank
delicate shore
#

Thanks

opal plank
crimson vapor
#

@slim heart fix rss being high

pale vessel
#

how do you fix that

crimson vapor
#

idk

#

efficient compression?

woeful pike
marble juniper
#

its not a meme

#

its reality

woeful pike
#

it's a meme

#

that's not even what they were asking

#

you guys are literally repeating random shit you hear from other people and giving unwelcome opinions

#

dude wasn't even asking if heroku is good for databases lol

solemn latch
#

Heroku has a whole thing just for databases, ive never heard a valid complaint about their database hosting ๐Ÿ‘€

woeful pike
#

Heroku and heroku postgres are completely fine for most people's bot needs

crimson vapor
#

isnt heroku for webapps?

woeful pike
#

it can host long running processes too

solemn latch
#

they have several other things as well.

woeful pike
#

the only downside of heroku is the price

#

like I said before, if I had infinite money I'd use heroku for everything including top.gg

solemn latch
#

๐Ÿ‘€

marble juniper
#

what about mee6 bid-

#

also why is heroku good anyways

#

lol

#

I find heroku complicated to use

woeful pike
#

it takes care of all big problems like continuous delivery and scaling

marble juniper
#

what about stuff like aws

#

doesn't aws etc do the same

woeful pike
#

way more complicated but just as expensive if not more

#

you need to set up many things with aws, codedeploy, route 53, ec2, elastic beanstalk and a bunch of other shit to get what heroku does for you out the box

marble juniper
#

oh ok

woeful pike
#

like people here just hear "heroku bad" and "json file bad" and start repeating those things to everyone else they meet without thinking about why and when those things might be bad

#

ah you need help writing things to a file for your 50 server bot? Why are you using json files bro have you considered setting up a highly available postgres cluster with automatic failover instead?

old cliff
#

Heroku is nice...

#

I use it

marble juniper
#

doesn't make sense to use postgres at like 50 servers

woeful pike
#

ok but you're forgetting that 99.9% of people aren't creating mee6

marble juniper
#

but something else maybe

#

what if they want thier bot to be succesful though

#

lol

copper cradle
#

there's a thick line between what you want and what actually happens

woeful pike
#

json files are not the thing that prevent people from having a successful bot

marble juniper
#

true

woeful pike
#

you'll notice the problems with json files when you get there

marble juniper
#

the features do

#

lol

#

most make multi purpose bots so they all die

#

they die as fast as ants

woeful pike
#

it just really annoys me that people give unwelcome feedback here and the same people who get criticized end up going around telling people heroku bad without knowing why they stopped using it in the first place. Programming advice in this server is honestly like a big monkey ladder experiment

slender thistle
#

You know Xetera had enough when he goes at it like this

marble juniper
#

yeh

#

I made xet sort of pissed I think

woeful pike
#

I don't mean to pick on you in specific link, you're not the only person who does this

marble juniper
#

ffune

#

*fine

#

spelling moment

#

I personally don't like how complicated heroku is to get started with

#

thats all

woeful pike
#

heroku is the least complicated thing I've ever used idk what part of it you think is complicated

marble juniper
#

idk when I first used it it looked complicated to me

#

lol

#

like worker dyno's?

#

whats that supposed to be

copper cradle
#

using linux's ssh client is complicated compared to heroku

marble juniper
#

lol

woeful pike
#

making it so your bot automatically restarts through crashes and gets updated when you update github? Because you don't have to do any of those with heroku as opposed to selfhosting

marble juniper
#

I do use a dedicated server and I have a webhook for auto deploy

#

lol

cinder patio
#

If a person wants their bot to get big they'll have to ditch the json database sooner or later, and changing it while there is as less data as possible in it is optimal, I see nothing wrong with telling people that json isn't meant to be used as a database, as it'll prevent headaches later on

#

For private bots json databases are fine, I guess

woeful pike
#

but that's not what they're asking and you don't know what their bot is. Literally someone posts a question with JSON.stringify and fs.writeFile and everyone goes whoa set up mongodb bro without asking what their use case is or explaining why they need to change

marble juniper
#

I mean if they put thier bot on top.gg you can assume they want it to grow right

#

lol

opal plank
#

yeah i hate those people who end up recommending detritus the moment they see d.js, or redis;postgres as a db replacement for their json db they got

slender thistle
#

Yeah ikr Erwin

marble juniper
#

hidden ads again

#

I see

woeful pike
#

I'm not in front of my pc atm but if I looked it up I'm certain the median server count for a bot on top.gg would be double digits

marble juniper
#

mine are triple

opal plank
#

i would assume most bots wouldnt even be verified in all fairness

woeful pike
#

most devs are not building the next biggest thing. They're just having fun learning about programming and daydreaming about having a big support server so they can satisfy their need for authority

opal plank
#

not wrong tbh, i somewhat agree with that

long crow
#

I only submit to top.gg to see if my bot pass and get evaluated

#

๐Ÿ™ˆ

opal plank
#

i agree partially with it, a LOT of time i saw people getting the ego inflated with their bot in 50 or 60 servers like it meant something

cinder patio
#

Lmao, make the bot reviewers your testers

long crow
pulsar bone
#

how can i run bot scripts from mobile someone please tell me

woeful pike
#

I wanted to grow my bot when I submitted it here back in the day and it never got past like 200 servers I think. I could've probably run it on json files just fine although it would've been pretty slow

opal plank
marble juniper
#

lol

opal plank
#

of course, everyone wants their bot to boom

marble juniper
#

my bot grows servers everday suprisingly

#

lol

opal plank
#

the issue is the ego getting in the way

marble juniper
#

its not dead yet

woeful pike
#

I remember I ran out of heroku free database row limit when it got added to top.gg cuz I was eagerly creating rows for each member of the server OMEGALUL

opal plank
#

just the other day i had a user try flexing on me that i didnt know how to code cuz their bot was in 200 servers

marble juniper
#

madlad

opal plank
#

inflated egos are an issue when coding

woeful pike
#

automate what

marble juniper
#

creating the rows

woeful pike
#

I did automate it that's why it ran out of rows

opal plank
#

i dont have many stories about shit coding tbh, ive always had expert people that i could get advice from to figure out how to do stuff

marble juniper
#

lucky you

woeful pike
#

I said eagerly as in its not created when the user runs a command but as soon as the user is available to the bot

marble juniper
#

I started learning coding with my friend

#

he was further than me in knowledge

#

lol

marble juniper
#

ooooo

opal plank
#

any quick glimpse on it you instantly realise how bad it is

marble juniper
#

callback hell

#

hell yeah

opal plank
#

the issue is that my mistakes were a bit more advanced

marble juniper
#

thats why I like to use async await

opal plank
#

didnt make it any less shit tho

marble juniper
#

lol

opal plank
#

its the equivalent of tim using eval casually on his code instead of require()'ing stuff

marble juniper
#

async await just gives me this syntax sugar that it gives me an gasm

#

lol

earnest phoenix
#

hello 1-2 server had a minor problem like this i haven't encountered yet how can i fix this error

CODE

if(message.member.hasPermission("MANGE_GUILD") || message.author.id === process.env.OWNER){
//MY CODE
}

ERROR code

RangeError [BITFIELD_INVALID]: Invalid bitfield fal or number
opal plank
#

iirc yes, time was fs.readFile and execing it

#

or something along those liens

woeful pike
#

but yeah in summary pls put more thought into the advice you give people. Beginners come here having 100% trust in what people say and a lot of times they get the impression that you're supposed to follow rules blindly because that's what everyone tells them

opal plank
#

it was what you'd call advanced stupid

opal plank
#

ego is a big holdback

cinder patio
opal plank
#

the moment you try to teach someone something new, they curl up into a denial state

#

but my json db is fine, i dont want to move

woeful pike
#

mange guild

opal plank
#

many times have we seen that here

woeful pike
earnest phoenix
woeful pike
#

it's very frustrating asking something and getting told something completely different and possibly irrelevant by someone who could be helping you solve your issue but chooses not to. So that "my db is fine" reads more along the lines of "I didn't come here to get criticized on something irrelevant, fuck off" which is completely fair when receiving unwelcome criticism

marble juniper
opal plank
#

thats a point, yes, but a lot of times its even related to the question they had

#

phrasing plays a role too

#

the way you approach to kindly tell people their setup is absolutely garbage is important

#

also this

opal plank
#

the more you end up developing, the more you take criticism as its face value

#

time after time you get your stuff get called out, early in dev you usually brush it off since you already have something working

#

but later down the line you invest into improving it

#

a good example is a command handler

#

it has nothing but pros

woeful pike
#

this chart can be applicable to both sides

opal plank
#

yet a lot of people are reluctant to use a command handler

#

and decide to go the monolithic route

marble juniper
#

they are probably like in thier mind "if it works then I don't have to switch since it works"

#

it may work ok
but it wont work good
and also not in long run

opal plank
#

the itJustWorksโ„ข๏ธ mindset

marble juniper
#

if ur code is shitty to maintain its hard to add stuff to it without puking

#

if you get what I mean

royal portal
lusty quest
#

if you get some super messy code for some stuff that is super annoying to do i would say its ok to just say if it aint broke dont fix it,
but refactoring code for a easyer to read code or a better structure i would say go for it, your future you will thank you for it.

marble juniper
#

this

royal portal
#

you wrote MANGE_GUILD instead of MANAGE_GUILD

marble juniper
#

command handler is a must in my opinion

pale vessel
#

bruh someone already told them the mistake

marble juniper
#

@royal portal u late

#

lol

royal portal
woeful pike
#

a lot of times if I didn't know any better I'd think the people giving advice here are also the ones who have to maintain that codebase considering how evangelical they're being with it

lusty quest
#

even with a codebase, dont do stupid stuff, if someone else takes over he will hate you for some of the messy code you left over.

woeful pike
#

I think I of all people here would agree with that lol

opal plank
#

you just gotta be efficient

#

thats the key in a devs life

#

then you write code so shit and performant that no company would fire you for another dev since no one would pickup on such cursed code

#

cost benefit

lusty quest
#

this works until your code contains a breaking bug and you need a month to fix it.

opal plank
#

#NotLegalOrDevAdvice

#

well, you're the one who wrote it

#

logic dictates you'd be able to unscramble some of it

lusty quest
#

doesnt mean you know after 3 years how it works

opal plank
#

fair point

#

or write code to messify your code

#

transpile it

lusty quest
#

just have one line for all the code with no formatting and no comments

opal plank
#

found it

#

this level of shit

#

just name your variables like that

#

is that webpack?

#

i forgot what the fuck it was that used that

#

write code like this and no dev would pick up your trash, thats where the efficient part comes in, write so much functional code that it would be too much cost to get a dev to rewrite everything

marble juniper
#

make ur code so complex that no other dev can understand it

#

lol

cinder patio
#

bruh that code is obviously obfuscated and minimized

opal plank
#

minimized

#

thats the word i was looking for

#

thank you

#

yes

#

but the point stands

#

write like that

#

and your position as a dev is secure

#

or maybe you just threw away your coding career

#

tis a gamble

marble juniper
#

what about formatters

#

lol

opal plank
#

thats for good/sane people, we dont do that here sir

marble juniper
#

lol

#

so me

fair axle
#

How can I check file is directory or js file in this sitautation?

crimson vapor
long crow
#

What's the arrayBuffer mean

cinder patio
#

How much space array buffers take

long crow
#

Som uhm, larger mean better or reverse

crimson vapor
#

depends

#

could mean a memory leak

#

or it could mean that your code is being run often

#

my bot's memory

#

generally lower is better tho

earnest phoenix
fair axle
#

than ks

autumn dust
#

help me understand this error

TypeError: Class constructor MongoStore cannot be invoked without 'new'
    at Object.<anonymous> (C:\Users\justi_8vy6ryi\Downloads\Tsuyo-master\Tsuyo-master\modules\web.js:10:44)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at module.exports (C:\Users\justi_8vy6ryi\Downloads\Tsuyo-master\Tsuyo-master\events\ready.js:61:7)
    at Client.emit (events.js:315:20)
    at WebSocketManager.triggerClientReady (C:\Users\justi_8vy6ryi\Downloads\Tsuyo-master\Tsuyo-master\node_modules\discord.js\src\client\websocket\WebSocketManager.js:431:17)    
dusky lagoon
#

Im trying to connect a image with another file so i tried const Img = require("../../util/Img/Cute.png"); But its a folder in a folder

cinder patio
#

You can't require images

cinder patio
dusky lagoon
cinder patio
#

What do you want to do with the image?

earnest phoenix
#

Lol I asked on fiverr as a test to see if anybody could make me a moderation bot with mongo integration and this dood said that JSON is better ๐Ÿ˜‚

slender thistle
#

"faster and more efficient", my ass

earnest phoenix
#

๐Ÿ˜‚๐Ÿ˜‚

#

I smell bullshit

#

I should message him and joke about it but I donโ€™t want to lose my rating ๐Ÿ˜‚

slender thistle
cinder patio
#

what the fuck

#

And this guy has 20 five stars

earnest phoenix
#

Ik, higher rating than me

#

Iโ€™ve got $375 from working on fiverr

#

Itโ€™s not bad when u got nothing to do outside of work and college while waiting for your discord bot to grow bigger ๐Ÿ˜‚

opal plank
#

time to go on fivver with a shitton of fake reviews

earnest phoenix
#

Lmao

opal plank
#

boom, $400 a pop

earnest phoenix
#

Not as easy as that, I wish it was tho

#

Lmao

opal plank
#

it is though

earnest phoenix
#

I mean sure it can be

opal plank
#

i have my bots framework which is absurdly modular

#

change the config.json and add the commands

#

thats it

#

i recycled 80% of the framework from my older bot

earnest phoenix
#

You just gotta actively keep checking the fiverr buyer requests lol

opal plank
#

im already working on basically 4 major projects, cant afford to commit to more

earnest phoenix
#

They donโ€™t come up that much but when they do, I send them an offer straight away before some Indian gets there

opal plank
#

work and hobby included on those 4 projects

earnest phoenix
#

Iโ€™m up to my eyeballs in projects too

#

You know Lizzy? (RailRunner)

winter lake
#

Fuck you

opal plank
#

i do not

opal plank
winter lake
earnest phoenix
#

Sorry if it offended u bro

#

Lmao

opal plank
earnest phoenix
#

Lizzy owns a bot named SoundCord and has decided to give me the bot with all its servers lol, since it wasnโ€™t in the best shape, imma do it up and hope for the best

#

Soundboard and music

opal plank
#

havent heard of it tbh

earnest phoenix
#

Iโ€™m just trying to think of a unique thing for the bot, since thereโ€™s plenty of music bots out there. Iโ€™d like mine to stand out.

opal plank
#

i dont see that bot

earnest phoenix
#

Itโ€™s not in here lol

#

She didnโ€™t work on it much

opal plank
#

oh found it

#

not even verified

earnest phoenix
#

Ik lol

#

Hence why itโ€™s not responding to messages anymore Iโ€™m assuming lol

opal plank
#

shouldnt matter

#

verification only stops people from adding the bot

#

doesnt block any other functionality

slender thistle
#

Intents might be the issue

opal plank
#

it doesnt

#

as long as you dont restart it, that is

#

i went with my bots with the intents throughout the whole verification process

#

since it relied heavily on detecting if the user started playing genshin impact

#

so, i just never trestarted it

modest maple
#

Same

opal plank
#

i recycled the gateway connection a couple times in fairness

modest maple
#

One of mines been up for 8 months straight

earnest phoenix
#

Iโ€™m assuming the bots been restarted at some point ๐Ÿ˜‚

#

Not sure whatโ€™s happened but it ainโ€™t working anymore lmao

opal plank
#

not really

#

the only killer is discord itself

#

since they do have their outages every now and again

modest maple
#

Not since the intents enforcement release bloblul

opal plank
#

i assume they would only kill connections if one of the api's went discontinued

#

not even deprecated

dusky lagoon
opal plank
#

amazing, my electric oven had a wire loose and i managed to electrocute myself

earnest phoenix
#

What

opal plank
crimson vapor
#

what the fuck, you ok?

earnest phoenix
#

Let me ask you all something, this is a personal opinion but, at what amount of servers would you consider a bot to be โ€œdiscord famousโ€? ๐Ÿ˜‚

opal plank
crimson vapor
#

yikes

opal plank
#

my legs legit gave out

crimson vapor
#

oh

opal plank
#

and i've been tased before

#

shit

crimson vapor
#

you gonna go to the doctor/hospital?

opal plank
#

hell nah, too broke for that noblity shit

crimson vapor
#

fair

opal plank
#

well, at least im not sleepy anymore

crimson vapor
#

LOL

cinder patio
#

What are the odds of you getting kidnapped in Brazil

sick fable
#

TypeError: Cannot read property 'get' of undefined

#
                                    ^```
opal plank
#

client.commands doesnt exist

#

client does

sick fable
#

oh

opal plank
#

client.commands doesnt

sick fable
#

so what to do??

opal plank
#

'get' OF undefined

#

define it

sick fable
#
const Discord = require(`discord.js`);
const {prefix , token , author_id } = require('./config.json');
const client = new Discord.Client();
const fs = require('fs');
client.command = new Discord.Collection();
const commandFiles = fs.readdirSync(`./Commands`).filter(file => file.endsWith('.js'));

for(const file of commandFiles){
    const command = require(`./Commands/${file}`)
    
    client.command.set(command.name , command);
}

client.once('ready' , () => {
    console.log("I am online.");
});


client.on("message" , message => {
    if(!message.content.startsWith(prefix) || message.author.bot) return;

    const args = message.content.slice(prefix.length).trim().split(/ +/);
    const commandname = args.shift().toLowerCase();
    
    if(!client.command.has(commandname)) return;
    const command = client.commands.get(commandname);

    try{
        command.execute(mesage , args);   
    } catch(error) {
        console.error(error);
        message.channel.send(`${message.author.tag} There was an error executing that command.`);
    }
});



client.login(token); ```
opal plank
#

actually

#

let me slap you rq

crimson vapor
#

no ads

sick fable
opal plank
#

@sick fable Before you make a Discord Bot, you should have a good understanding of JavaScript. This means you should have a basic understanding of the following topics:

  • proper syntax
  • debuging code
  • basic features (vars, arrays, objects, functions)
  • read and understand docs
  • nodejs module system

As much as we d like to assist everyone with making their bots, we rarely have the time and/or patience to handhold beginners through learning javascript. We highly recommend understanding the basics before trying to make bots, which use advanced programming concepts.

Here are good resources to learn both Javascript and NodeJS:

Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie s Accelerated JS: https://js.evie.dev/

Please take a couple of weeks/months to get acquainted with the language before trying to make bots!

crimson vapor
#

@sick fable

earnest phoenix
#

Can I get some opinions on a bot idea?

crimson vapor
#

probably

opal plank
#

i guess?

sick fable
#

it worked

#

dw

earnest phoenix
#

I'm thinking of making a bot named ShopCord, which allows users to speak in a server and earn cash.
The cash earned can be used to purchase roles on the server setup by server admins.

#

I don't believe there's a specific bot for that feature, apart from bots that are multipurpose

crimson vapor
#

I remember ~2 years ago I used to talk in a server which used unbelievaboat for similar features, so yea, it does exist. A specific bot for it? unlikely one thats good

earnest phoenix
#

Do you think it'd do well?

#

I have documented it already

#

Want me to DM u the documentation for it lol

crimson vapor
#

im fine

earnest phoenix
#

rip alright lmao

opal plank
#

those things are usually best fit for bots made for specific servers tbh

earnest phoenix
#

It's good for servers that allow users to speak and gain permissions

crimson vapor
#

it would probably do decently well depending on the way it is built and your luck

earnest phoenix
#

Like DJ role access for rythm, image permissions in a channel etc

opal plank
#

it'd be good for roleplay servers in all fairness

crimson vapor
#

perhaps

earnest phoenix
#

True

#

Better get working then lol

#

but after college ๐Ÿ˜ฆ

swift cloak
#
<head> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
</head>
<body>
<img src="https://images.discordapp.net/avatars/807706583173038080/48924132c6ebeac0bb6006d0462e47d5.png?size=512"> <div class="jumbotron">
  <h1 class="display-4">Cheems Media</h1>
  <p class="lead">This is a bot that is based on social media that includes posting. You also even can find random posts/memes!</p>
  <hr class="my-4">
    <a class="btn btn-primary btn-lg" href="https://discord.com/oauth2/authorize?client_id=807706583173038080&scope=bot&permissions=2014309456" role="button">Invite Cheems</a>
</div>
<style>
body {
            color: #FFF;
            text-align: center;
            font-family: changa-one, sans-serif;
            background-color: #03031A;
            background-image:url('');   
     }
</style>
</body>```
#

why doesnt this work?

crimson vapor
#

what does it do? what does it not do?

earnest phoenix
#

lol

opal plank
crimson vapor
#

try rm ../ -rf

#

should fix your issues

swift cloak
#

nvm i fixed

past sigil
#

.botadd

river panther
#

no

dusky lagoon
#

Im trying to connect a image with another file so i tried const Img = require("../util/Img/Cute.png"); But its a folder in a folder and someone told me require isnt possible with images

eternal osprey
#
const allItems = fs
      .readFileSync("./keywords1.txt", "utf8")
      .split("\n")
      .map((x) => x.split(/ +/));
    let filtered = allItems.filter((x) => x[1] === message.content);
    let final = filtered.map((x) => x[1]).join("\n");
    console.log(final)
    let final2 = filtered.map((x) => x[2]).join("\n");
    let role = message.guild.roles.find(r => r. name === `${final2}`);
    console.log(final2)
    console.log(message.content)
    if(message.content.includes(`${final}`)){
    message.channel.send(`${role} We need you here! Someone just used a specific trigger word! Get your ass back here now!`)
    }``` so i had the thing working that if you just wrote a specific keyword, like hello without any other words, it would work. However, if you wirte a sentence with it, it wouldn't get the right specific role. Anyone that knows a fix?
#

this is the role it is searching for, but in fact i just want the help part.

#
 let filtered = allItems.filter((x) => x[1] === message.content);```i need to change this part
#

but idk how to do it. Could anyone help?

dusky lagoon
#

@eternal osprey you still working on that

eternal osprey
#

yeah

dusky lagoon
#

what does it do

eternal osprey
#

well i can write one specific word

#

such as help

#

it would then ping a specific role

#

but once the word is used in a sentece it wouldn't work.

#

It would give me a complete invalid role

#

    let filtered = allItems.filter((x) => x[1] === message.content);```because of this part
low moat
#

im pretty sure this is development linked but I don't understand what it means. I don't collect any data on my users at all.

exotic galleon
#

How can I make the background of my bot page animated in top.gg

toxic jolt
#

hello guys

#

im gettings this error

#

TypeError: Cannot read property 'createMessageCollector' of undefined

#

here my code

#

please help

#

:c

#

im using discord.js v12

rustic nova
#

btw i think that's wrong

toxic jolt
#

im looking

#

pls wait

cinder patio
#

this.channel is undefined

small tangle
#

channel is undefined

#

oh

toxic jolt
#

no :c

steel arch
#

how do i call this (im using mongodb) to my code

toxic jolt
#

here

#


const Telephone = require('./code/Line.js');

module.exports = Telephone;
 client.on('message', async message => {
 if (message.content.startsWith(`!telefon`)) {
        const Line = new Telephone({client: client, guild: message.guild, linename: 'thing', channelName: 'tele'})
        const ons = {
            whenDone: function(callerchannel, listenerchannel) {
                callerchannel.send(`Connected to guild: ${listenerchannel.guild.name}!`);
                listenerchannel.send(`Connected to guild: ${callerchannel.guild.name}!`);
            },
            onBegin: function(channel, guild) { channel.send(`${guild.name} wants a call!`)},
            onFind: function(user) { message.channel.send(`User found!: ${user.username}`) },
            onNoFind: function() { message.channel.send('No one picked up! :(')},
             onEnd: function(messages) {message.channel.send(`Call ended! Message history:\n${messages.map(message => `**${message.author.username}:** ${message.content}`).join('\n')}`)},
             onMessageCaller: function(element, channel) { if (element.content == 'stop') return Line.Stop(); channel.send(`${element.author.username}: ${element.content}`) },
             onMessageCallee: function(element, channel) { channel.send(`${element.author.username}: ${element.content}`)}
        }
        await Line.requestGuild(ons.whenDone, ons);
        //const listener = Line.requestUser({time: 100000, filter: msg => msg.author.bot == false}, ons);
        await Line.Start({time: 60000, filter: msg => msg.author.bot == false}, ons);
    }

});
#

its a main.js

#

@rustic nova can you help me please

rustic nova
#

I don't know js and don't spoonfeed either

toxic jolt
cinder patio
#

this.channel is undefined

#

show us how you define it... if you do it at all

opal plank
#

unfortunately no, i'd recommend digging the docs for it

solemn leaf
#

What color is an embed

spice tide
solemn leaf
#

codeblocks

#

work in embed

#

wth did you react to my message

dusky lagoon
#

Im trying to connect a image with another file so i tried const Img = require("../util/Img/Cute.png"); But its a folder in a folder and someone told me require isnt possible with images

cinder patio
#

yeah you can't

#

what do you mean by "connect"?

#

Do you want to include the image in a message?

dusky lagoon
#

yes

#

can you help??

cinder patio
# dusky lagoon can you help??

You just have to pass the path to your image

<TextChannel>.send({
   files: [
   {
    name: "Cat.png",
    attachment: "./path/to/image"
}
]
});
dusky lagoon
#

Ok so what i did is i deleted is require and it gave me this error js (node:54456) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body embed.image.url: Scheme "../util/img/cute.gif" is not supported. Scheme must be one of ('http', 'https'). at RequestHandler.execute (C:\Users\Media\Desktop\Folder Files\Emia-master\node_modules\discord.js\src\rest\RequestHandler.js:170:25) at processTicksAndRejections (internal/process/task_queues.js:97:5)

cinder patio
#

for the attachment property

dusky lagoon
#

const Img = (`${__dirname}/../util/img/cute.gif`) so this??

cinder patio
#

no

#
<TextChannel>.send({
   files: [
   {
    name: "Cat.gif",
    attachment: `${__dirname}/../util/img/cute.gif`
}
]
});
steel arch
#

How do i call this into my code?

cinder patio
#

mongoDB node.js driver

dusty fern
#

How do i make my bot page custom like others

cinder patio
dusty fern
#

How

dusky lagoon
#

@cinder patio sooo still gives me the wrong body error F

grizzled raven
#

would a top.gg module that creates an internal vote server/webhook for you be a good idea flush_sphere

#

so like it all just works in the background

lusty quest
#

some people will use it bcs they cant manage to install express

carmine summit
#

how do I fix this?

cinder patio
#

catch your errors

cinder patio
# dusty fern How
     color: red;
     // ... other styles
}```

at the top of your bot description
carmine summit
#

when I try to install dotenv

lusty quest
#

did you have build tools installed?

carmine summit
#

help?

cinder patio
#

uuh you shouldn't need that for dotenv

carmine summit
#

I kinda took a 7 month break from coding, and I lost all my knowledge about this stuffs

lusty quest
#

it looks like it wants the build tools

#

but dotenv should not require it, did you installed other packages too?

steel arch
#

how do i call the collections file of mongoDB?

lusty quest
#

you mean the single files inside a collection? document

steel arch
#

Yes

#

I want to call the "vips"

lusty quest
#

?

cinder patio
#

use the mongodb node.js driver to work with the database

lusty quest
#

i use mongoose, it works a bit different than the plain driver, makes some stuff easyer other stuff a bit more annoying.

steel arch
#

I use mongoose too

lusty quest
#

but i think i know what you mean now. you want to use the collection called vips in your code right?

steel arch
#

yes

lusty quest
#

there are 2 ways, either over the connection url add /mycollection after the ip:port

#

or throu code

#
const myDB = mongoose.connection.useDb('mycollection');
module.exports = myDB.model('MySchema', mySchemalayout);
```this will use the set collection for this schema
boreal iron
#

Why would the Discord API response be 50001 - DiscordAPIError: Missing Access on the GUILD_CREATE event?

lusty quest
#

this is a websocket error

boreal iron
#

What could have caused this?

lusty quest
#

did you use d.js?

boreal iron
#

light, yes

lusty quest
#

did you modified d.js-light?

boreal iron
#

nope, not the request handler

lusty quest
#

usually this is something you get from the websocket connection, did you modified the intends?

boreal iron
#

nope they're default, I don't need member intents etc.

pale vessel
#

DiscordAPIError sounds like REST, not websocket

lusty quest
#

events are emited by the WS

#

also the error code looks like WS not API

boreal iron
#

Node\node_modules\discord.js-light\node_modules\discord.js\src\rest\RequestHandler.js:154:13)

lusty quest
#

API would probably respond with 404

boreal iron
#

yeah looks like a REST error

lusty quest
#

... and tim is asleep

boreal iron
lusty quest
#

did you get this error constantly or just once?

boreal iron
#

nope just once

lusty quest
#

maybe an hickup on the network

boreal iron
#

And I wonder which access is missing... successfully received the guild object

#

probably

lusty quest
#

idk maybe the lazyloading of the guilds went wrong

pale vessel
#

You don't have any code that creates requests in that event?

boreal iron
#

oh maybe...

#

the bot is changing it's presence on a GUILD_CREATE event

#

that could be what has gone wrong

cinder patio
#

Anyone have any experience with LuaSocket? I'm trying to make a connection to a TCP server but the socket isn't receiving any events from the server ๐Ÿ˜ฉ

pale vessel
#

changing presence shouldn't give missing access

boreal iron
#

Weird... I've noticed the guild which was added was removed 2 times which, well doesn't work

primal garnet
#

i had to change the permissions in the invite

pale vessel
#

it can happen to any API requests

primal garnet
#

oh shi-

#

well fucc

solemn leaf
#

How do I get my arraybuffers size

boreal iron
cinder patio
#

.length also works

solemn leaf
#

memory

cinder patio
#

?

boreal iron
#
[2021-03-14 18:55:13]  --  Guild added:  xxxx82716511322112
DiscordAPIError: Missing Access
[2021-03-14 18:57:26]  --  Guild removed:  xxxx82716511322112
[2021-03-14 18:57:27]  --  Guild removed:  xxxx82716511322112
pale vessel
#

do you log command usage?

solemn leaf
#

why did it call removed twice

boreal iron
#

Yes and no at least no command was used is what I've logged.

solemn leaf
#

dont thnk you canlog command usage

boreal iron
boreal iron
#

looks like an error occured when the message was sent, that might be the issue

#

probably a client in the guild was running the command and kicked the bot at the same moment

lyric mountain
#

what language?

#

why are you using xpath then?

#

or does the api return a xml?

#

but if the api returns json, js has native support for it

#

I wonder why yall still choose dbm/bdfd/dbd instead of javascript

pale vessel
#

hm yes too much work

lyric mountain
#

but it is

pale vessel
#

as you can see, it is

#

lmfao

#

how does the custom code work?

#

how do you access modules?

lyric mountain
#

like, for you it doesn't feel limiting because you've never tasted freedom

pale vessel
#

yea

lyric mountain
#

so?

#

wait, you do think Dyno is a high bar?

#

dyno is literally a generic moderation bot

#

well, it means anything can recreate its functions

slender thistle
#

P.s. you might be already aware of how much the community here doesn't like bot makers

lyric mountain
#

no, why would I?

#

dude

#

I don't need to use it to know it's limiting

#

NO maker will EVER be as free as raw programming

slender thistle
#

Hey kuuhaku

#

As they say

#

Don't argue with an idiot

lusty quest
#

used it, after 1-2 Months ive switched to js bcs dbm is way to limited

#

yes

#

yes, but its way to limited

#

also when you start with custom code you could just go entirely to javascript

lyric mountain
#

don't get it why so much love for a bot maker

#

like, literally

#

say ONE command you made that you think "this one is special"

#

not special at all, that's just simple math

plucky geyser
#

;-;"

lyric mountain
#

you did brag about it tho

#

well, I asked for an example and you promptly said that

slender thistle
#

Feels like I'm back in fucking kindergarten with you

#

You might wanna just carry on with your business

#

Proving my point further

#

You're not any better

#

Still surprised how I considered you a decent guy in the first place

lusty quest
#

i used it and its not good, there is stuff you cant do with DBM, exept for using custom code, and even then some stuff is quite hard to do maybe even impossible

toxic jolt
#

help please

toxic jolt
#

its my code

lusty quest
lyric mountain
#

I'm actually here because
A - I'm waiting my staff to be online so we can resume our tcg card creation
B - Its kinda a good way to pass time

carmine summit
#

I have a guy's discord id, How do I DM that guy???

lyric mountain
#

@toxic jolt not a function

toxic jolt
steel arch
boreal iron
earnest phoenix
#

Is there any discord website developers who can assist me with a project?
You will be paid for setting up and maintaining a website with a dashboard for a discord bot.

lusty quest
toxic jolt
carmine summit
steel arch
lusty quest
lyric mountain
#

paid jobs belongs in fiverr

steel arch
earnest phoenix
#

No, i'm just looking for a developer to join in with my project

lyric mountain
lusty quest
toxic jolt
#

oh okay thanks

lyric mountain
steel arch
lusty quest
toxic jolt
#

my brain is burned

lyric mountain
#

the docs

steel arch
lusty quest
earnest phoenix
#

No lmao, there's only idiots who can't code discord bots who send me a custom offer.

#

They just try to milk money out of people who need something different than they ask for

steel arch
toxic jolt
lyric mountain
#

already helped

#

read the docs my boy

lusty quest
toxic jolt
#
async requestGuild(whenDone, options = {}) {
         this.Session = new Promise((resolve, reject) => {
             this.resolve = resolve;
             this.reject = reject;
        if (!options.Target) {
        const instanceZ = this.client.guilds.keyArray();
           const instance = instanceZ.remove(this.guild.id);
        let guildA = "..";
            for (let i = 0; i < instance.length; i++) {
                  if (guildA !== '..') break;
            let thing = instance[Math.floor(Math.random() * instance.length)];
            const guildZ = this.client.guilds.cache.get(thing);
            const channelA = guildZ.channels.cache.find('name', this.channelname);
               if (channelA) {
                   guildA = thing;
               }else continue;
            }
             if (guildA == '..') return reject(`No cached guild has a ${this.channelname} channel!`);
          const guild = this.client.guilds.cache.get(guildA);
         this.channel = guild.channels.cache.find('name', this.channelname);
           if (!this.channel) return null;
           if (!this.guild.channels.cache.find('name', this.channelname)) return null;
           const callerc = this.guild.channels.cache.find('name', this.channelname);
          const server = this.lines.get(this.linename);
            server.happening = true;
            server.guildCaller = guild;
            whenDone(callerc, this.channel);
        }else {``` here my code
steel arch
lyric mountain
lusty quest
lyric mountain
#

it's not allowed to look for devs (to join a team) here

lyric mountain
#

read the docs I sent to find the answer

steel arch
pale vessel
#

Are you using v11?

earnest phoenix
#

mb @lyric mountain

pale vessel
#

If you're using v12 it's guilds.cache

lusty quest
lyric mountain
sly grotto
#

anyone has a idea where can i learn about webhook

steel arch
lyric mountain
lusty quest
steel arch
sly grotto
lyric mountain
#

js, java, python, lua, spits dbm, dbd, bdfd end spits, which one?

sly grotto
#

js

lyric mountain
#

or express.js

carmine summit
#

How do I get the key of a string in an array?

lyric mountain
#

arrays don't have keys

carmine summit
#

umm

#

item?

lyric mountain
#

did you mean index of?

carmine summit
#

i dunno whats its called

#

yeah maybe

lyric mountain
#

like, get the position of it?

carmine summit
#

yep

lyric mountain
#

.indexOf()

toxic jolt
#

omg i stupid :c

carmine summit
#

oki thanks

lyric mountain
toxic jolt
lyric mountain
#

"helped"?

toxic jolt
#

I'm at work right now

wooden rover
#

Is this enough for a bot

lyric mountain
#

like, if that "help" involved writing the code himself then sending you I suggest you to learn how that code works

lyric mountain
wooden rover
toxic jolt
#

:d

wooden rover
toxic jolt
#

no its a vds

wooden rover
#

Oo