#development

1 messages ยท Page 1360 of 1

slender thistle
#

There's also special characters like \n

earnest phoenix
#

yeah

#

and \u200b is a non-qwerty Unicode charcter zero width space iirc

slender thistle
#

Yup

earnest phoenix
#

awesome

#

can ye link me da docs on MDN for this stuff

rocky hearth
#

Also used to print a backslash, '\\'

delicate shore
#

My bot is logging no error

#
client.on('guildMemberAdd', async(member) => {

  const guild = member.guild
  const wlcm = db.get(`WLCMCHANNEL_${guild.id}`)
  if(wlcm == null || wlcm == undefined || !wlcm) return
  const wlcmfinal = msg.guild.channels.cache.get(wlcm)

const card = new canvacord.Welcomer()
.setUsername(member.username)
.setDiscriminator(member.discriminator)
.setGuildName(guild.name);
card.build().then(data => {
    let attachment = new Discord.MessageAttachment(data, "test.png");
wlcmfinal.send(attachment)
})
})```
#

My Code

neon heart
#
  const wlcmfinal = msg.guild.channels.cache.get(wlcm)

replace msg to member

pale vessel
#

member.user.username, same goes to discriminator @delicate shore

#

also, just use if (!wlcm) return;

delicate shore
#

ohh

#

thnx

#

and

#

it should be guild instead of msg.guild

pale vessel
#

both works

#

you defined guild as member.guild

#

honestly, that's redundant, avoid creating variables like that

#

just straight up use member.guild

delicate shore
#

oh k

earnest phoenix
#

Error: Cannot find module 'snekfetch'

#

npm install modulename

#

what

#

js

#

i ahve

#

Go learn JS

#

lol

#

Then NodeJS

neon heart
#

aowkwok

#

lmao

#

you must run

earnest phoenix
neon heart
#

npm i snekfetch

earnest phoenix
#

Also

#

Snekfetch is no longer maintained

#

So ude node fetch instead

neon heart
#

npm i node-fetch

earnest phoenix
pale vessel
#

npm uninstall npm

earnest phoenix
#

rm -rf C:\

neon heart
#

How to stop countdown when someone send message 'stop'?
here my code

client.on('message', async message => {
  if(message.content === 'start') {
  let countdown = 10
  var time = await message.channel.send(`${countdown}s`)
  function starttimer() {
    if(message.content === 'stop') {
    clearInterval(timer)
    } else {
    countdown = countdown - 1;
    time.edit(`${countdown}s`)
    }
  }
var timer = setInterval(function () {starttimer();}, 1000)
}  
})
earnest phoenix
#

what i do

marble juniper
#

@neon heart you don't need a function for the setInterval you can just use setInterval directly without creating a function and then use clearInterval(this) instead

#

I hope you understand what I mean

neon heart
#

ok wait

earnest phoenix
#
    throw err;
    ^
Error: Cannot find module 'snekfetch'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:548:15)
    at Function.Module._load (internal/modules/cjs/loader.js:475:25)
    at Module.require (internal/modules/cjs/loader.js:598:17)
    at require (internal/modules/cjs/helpers.js:11:18)
    at Object.<anonymous> (/rbd/pnpm-volume/8cbb5981-f02b-460a-8ccd-c240567c484b/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/util/Util.js:1:81)
    at Module._compile (internal/modules/cjs/loader.js:654:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
    at Module.load (internal/modules/cjs/loader.js:566:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
    at Function.Module._load (internal/modules/cjs/loader.js:498:3)```
sick fable
#

Can someone tell what's the meaning of payload

tardy hornet
#
D:\among us emojis\node_modules\discord-player\src\Player.js:608
        }, this.options.leaveOnEmptyCooldown ?? 0)
                                              ^

SyntaxError: Unexpected token '?'

i cant find that

earnest phoenix
#

why are there two ?

#

it should only be one

#

i can't find that
the file path is also there mate

golden condor
#

@tardy hornet to use ?? You need node 14

earnest phoenix
#

@tardy hornet imagine sending where? in line 608? it's not there and then deleting the message probably cuz you realize it's actually there

tardy hornet
#

no its not

#

there

earnest phoenix
#

smh

golden condor
#

You need to install node v14

#

To use ??

eternal slate
#

O

solemn jolt
#
  "711900803232956478": {
    "guildId": "711900803232956478",
    "guildChannel": "741721773959020629",
    "guildNum": 1102,
    "totalCount": 1149,
    "lastMem": "737611247989686333"
  },
  "669175474798198824": {
    "guildId": "669175474798198824",
    "guildChannel": "767650943717998622",
    "guildNum": 262,
    "totalCount": 11,
    "lastMem": "610955741830053894"
  },
  "749492313104842835": {
    "guildId": "749492313104842835",
    "guildChannel": "768084884165492756",
    "guildNum": 37,
    "totalCount": 8,
    "lastMem": "763087229920083968"
  }
}

I have a this json database i create a code to get me higher totalCount

let serverData = JSON.parse(fs.readFileSync("./serverData.json", "utf8"));
client.on("message", message => {
  let args = message.content.split(" ");
  let data = serverData;
  let M = 0;
  if (args[0] === prefix + "setHdata") {
    data.forEach(D => {
      if (data[D].totalCount > M) {
        M = data[D].totalCount;
      }
    });
    message.channel.send(M);
  }
});

This is a code but get me error in

rose warren
#

@solemn jolt are you sure the path to the json file is correct? Try maybe with ../serverData.json

solemn jolt
#

@rose warren ok

leaden rover
#

How do I make a disable command, so if a user has administrator perms and/or manage_server perms, they can disable a specific cog/command in the guild, so that it cannot be used?

rose warren
#

Or just try console logging serverData

#

Looks like your path was correct

solemn jolt
#

@rose warren i can do serverData.forEach?

rose warren
#

Yes

solemn jolt
rose warren
#

Ah... Sorry. I just woke up. You can't forEach through an array of objects like that

#

You have to transform the objects into an array first

solemn jolt
#

How?

leaden rover
#

I'm not getting any result for this:

elif member == member.id(734822514894831639):
            embed = discord.Embed(title=":x: w-why do you want to ban me? What the heck did I do? :(")
            await ctx.send(embed=embed)```
Is there a problem? Also how do I make it so the bot cannot ban itself?
rose warren
solemn jolt
#

@rose warren thak you๐Ÿ‘

rose warren
#

No problem! ๐Ÿ˜Š

earnest phoenix
leaden rover
rose warren
#

Sorry

leaden rover
#

its k

earnest phoenix
#

Does anyone know how I could solve the fault?

rose warren
#

@leaden rover what do you mean make it so the bot cannot ban itself?

leaden rover
#

Well, if I try to use the ban command, on the bot, it would be able to ban itself

rose warren
#

@earnest phoenix https://dis.gd/gwupdate

earnest phoenix
#

thanks

solar helm
#

hi

rose warren
#

Just check if the user id mentioned in the ban command is equal to the client id and if it is then return a different result.

solar helm
#

what

stable eagle
#

Since when can bots ban themself-

leaden rover
#

ok

rose warren
#

@leaden rover in your code it looks like the id you're trying to compare with is a number not a string? I don't know discord.py but in JS ids are strings

leaden rover
#

ok

#

How do I do it IF its not an ID?

rose warren
#

Do what if what's not an ID?

white sun
quick ridge
#

how can i get spo party link

slender thistle
#

@white sun None as far as I'm aware

#

What's your bot's actual server count and what do you get when fetching the API directly via /api/bots/<bot_id>?

tardy moth
#

Guys where to make the bot from any website or application ..

#

To create bot

white sun
#

@slender thistle ill quickly check, wait one moment

tardy moth
#

Guys where to make the bot from any website or application ..
@tardy moth ..

white sun
#

wdym @tardy moth

#

u want a website where u can create a bot so with finished command and all that?

tardy moth
#

Yes

slender thistle
#

Mind showing in DMs what top.gg token you are using

white sun
#

Mind showing in DMs what top.gg token you are using
@slender thistle so u mean me?

tardy moth
#

Haw with phone

white sun
#

idt that is possible not sure

slender thistle
#

Yeah Narmy

white sun
#

okay

tardy moth
#

I want a website or application to create a bot

#

Ok with pc

#

.

#

You don t have with pc haw

quick ridge
#

guys how can i get this invite link

red cradle
#

Help: I have an error

C:/Users/Fryer/Desktop/kine-bot/index.js:590
client.login(bot token)

SyntaxError: Unexpected end of input

pale vessel
#

can you show your file

red cradle
#

Full?

#

no, sorry ...

earnest phoenix
#

LOL

pale vessel
#

have fun fixing your code

#

unless you actually put bot token...

#

if so, you are retarded, i'm sorry

round wave
#

๐Ÿ˜‚

earnest phoenix
#

"doctor i have a really bad cough"
"i need to take a look at your breathing"
"...no sorry"

fickle sapphire
#

๐Ÿคฃ

olive wedge
#

lol

viscid gale
#

does message.me return my bot as a member?

olive wedge
pale vessel
#

don't think so

olive wedge
#

@olive wedge

viscid gale
#

?

pale vessel
#

go away

olive wedge
pale vessel
#

@twilit rapids

viscid gale
#

this dude is strange

pale vessel
#

indeed

twilit rapids
#

Interesting

#

@olive wedge keep this channel on topic thank you

viscid gale
#

so i was wondering if that .me setup existed anywhere else

misty sigil
#

I dont think so

slender thistle
#

but that'd ultimately be either User or Member class in any case since a message author can be either

#

depending on where the message was sent

viscid gale
#

k im trying to dm a user that tries to talk to me in a place that I can't respond and here's my code

if(!msg.channel.permissionsFor(msg.guild.me).has('SEND_MESSAGES')){msg.author.send(`I do not have permissions to \`send messages\` to channel <#${msg.channel.id}>`)}
#

what am i missing(cuz it doesn't handle the error)

stoic hull
#

So, how do i remove the , when i .map()?

pale vessel
#

join it

#

@viscid gale no errors?

#

you can use `${channel}` for mention, same goes to roles, users, members, roles, and emojis

stoic hull
#

Thank you flaze.

viscid gale
#

@viscid gale no errors?
@pale vessel no the exact error i was trying to handle still happens

pale vessel
#

what's the error?

viscid gale
#

"missing permissions"

pale vessel
#

can you check whether you used the same method before checking for permissions?

quartz kindle
#

@viscid gale if you have any code after that if, it will still run, because you dont return

#

unless you have an else

viscid gale
#

i do

#

the full code isn't what i gave, but it isn't that kind of error

#

it's the error where i miss the permissions to respond in a channel

quartz kindle
#

thats what im saying

viscid gale
#
if(myResponse!=""){
  if(!msg.channel.permissionsFor(msg.guild.me).has('SEND_MESSAGES')){msg.author.send(`I do not have permissions to \`send messages\` to channel <#${msg.channel.id}>`)}
  else if(myResponse.length>=2000){msg.channel.send(`<@!${msg.author.id}>, my response to your request would be too lengthy\nPlease try a request that gives a shorter response`)}
  else{msg.channel.send(myResponse);}
      }
else{msg.channel.send(`<@!${msg.author.id}> I was unable to process what you just told me. Please use a valid command\nTo see the list of commands, type the following command below\n${myBot} commands`);}
#

messages r sent, it's just that that specific situation i still can't handle

quartz kindle
#

put a console log in there to see if its actually being run

viscid gale
#

well the last elses work

#

if i ping my bot without proper command, it's handled and when i ping my bot with a real command, it responds

quartz kindle
#

i mean

#

put a console.log inside the if(! permissions) before the msg.author.send

#

to see if that if block is working

viscid gale
#

oh

#

ite just tested the 2000 length part and it also works... gonna do what u said now

sharp thicket
#

-botinfo 736933259178541177

gilded plankBOT
#
Bot info
ID

736933259178541177

Username

Avio but spooky

Discriminator

1150

Short Description

Multi purpose discord bot ranging from antiswear to image manipulation with a web dashboard coming soon!

Library

discord.js

Prefix

a!

Total Upvotes

6

Monthly Upvotes

7

Server Count

No server count

Owner(s)

@sharp thicket
@arctic igloo

sharp thicket
#

huh wtf

grave mist
#

What's wrong with this code

const guildCount = (await client.shard?.fetchClientValues('guilds.cache.size'))?.reduce((acc, guildCount) => acc + guildCount, 0);
const shardCount = client.shard?.count;
const shardId = client.shard?.ids[0];

await dbl.postStats(guildCount, shardId, shardCount);
#

It posts more guild count

#

That is, guildCount is around 2900, after posting, it becomes around 4800

quartz kindle
#

you're posting the total guild count for a single shard id

#

ie, if you have 2 shards with 1k guilds each, you're posting 2k from shard 0, and another 2k from shard 1

grave mist
#

No, it only posts from shard 2

#

Am I supposed to post only the guild count in that shard and have to post from each shard?

quartz kindle
#

either post the individual count from each shard, or post the full count for all shards

grave mist
#

I post full count for all shards in shard 2 currently

#

So the guildCount is 2900 but I see 4800 in the website

quartz kindle
#

top.gg accepts an array of shards, not sure if the library also does

#

but try dbl.postStats([1500,1400]) for example

viscid gale
#

well yea the command block doesnt work

#

for me

grave mist
#

1 sec

#

No, the library doesn't accept array

#

I don't see any reason about why it thinks the guildCount is 4800

#
  async postStats(serverCount, shardId, shardCount) {
    if (!serverCount && !this.client) throw new Error('postStats requires 1 argument');
    const data = {};
    if (serverCount) {
      data.server_count = serverCount;
      data.shard_id = shardId;
      data.shard_count = shardCount;
    }
#

It simply sends what I provide in argument

quartz kindle
#

then it should work

grave mist
quartz kindle
#

dont reduce it

#

send the array

grave mist
#

That's exactly what I'm passing to postStats which doesn't change anything but it somehow becomes 4800

#

dont reduce it
@quartz kindle The library accepts only array, should I directly use the API then?

#

I mean, I don't see why it become 4800 tho

quartz kindle
#

the library passes whatever you give it, it doesnt do anything

grave mist
#

Yes, it passes 2935 as server_count, 2 as shard_id, 3 as shard_count

quartz kindle
#

yes, likely because it expects something form other shards but it never receives

#

thats why im telling you to send them as an array

grave mist
#

Alright then

quartz kindle
#

instead of 2935,2,3 you send [1000,1000,1000],undefined,undefined

#

the shard count will be obtained from the array length

#

and each index is the shard id

grave mist
#

No, the library accepts only number so I have to use the API

#

Can you link me the API

quartz kindle
#

where does it accept only a number

#

it simply forwards it

grave mist
#

It has type number to it

quartz kindle
#

oh youre using ts?

grave mist
#

I do, yes

quartz kindle
#

well fuck ts

#

it works with js

#

lmao

grave mist
#

Then type is wrong Shrug

#

wait a sec

quartz kindle
#

so yeah use the api then

#

thats what i do too

grave mist
#

Last

#

I mean

#

I send in last

#

You can send in any afaik

quartz kindle
#

wait

#

it says number or array of numbers

grave mist
#

Yes

#

Yea well, in typings, it's number

quartz kindle
#

ye typings are def wrong

grave mist
#

I'll submit a PR then?

quartz kindle
#

sure

grave mist
#

I'll just edit the link

quartz kindle
#

lmao

viscid gale
#

my test condition is correct, but the block isn't running

grave mist
#

But last commit is 20 days ago kappaLUL

#

I'll just sumbit a PR then and come after 1 week and see

quartz kindle
#

its not the only typings issue

grave mist
#

I see

#

Seems like the repo is active though it's deprecated

quartz kindle
#

he was the maintainer of it

grave mist
#

ah

#

bruh

#

I'll just try maybe then

#

For now I'll just put my files into the dblapi.js folder

viscid gale
#

oh shidd don't bother, i just pulled a retarded :l

crystal wigeon
#

I've literally copied the same thing and it doesnt work.. it works with yt urls

#

jsut not with names

#

all dependencies are latest

#

can someone help

#

pls

unique nimbus
#

That is probably an older version of discord.js

#

you also leaked your token

crystal wigeon
#

ye its a throw away test bot anyway imma be deleting it later once this works

#

my discordjs is also latest

#

;-;

fluid basin
#

of course it only works with urls

#

what else would it work with

#

you need to convert the name to url

#

and you need to use yt api

crystal wigeon
#

on the discord-player doc it says all i need to send is "despacito"

#

and it'll do the searching for you

#

i've installed the dependency packages also ytsr ytdl-core etc

fluid basin
#

you must search the track

#

using the search function

prisma bramble
#

@crystal wigeon if you just wanna do that maybe you should go with distube instead of discord-player

crystal wigeon
#

ah yes i came accross distube yesterday but was hung up on getting thsi to work and forgot about it. was gonna try that next

#

search function? but in the doc they just pass the "despacito" in the args
the comment like clearly says "!play Despacito" will play the song

fluid basin
#

ask the developers then

prisma bramble
#

Also i need help with somethin'

I'm making a multiguild bot, is quick.db good? I mean when the bot gets in servers with thousands of members, will the json file be able to manage it all? No shards at this point.

fluid basin
#

and you removed your code, so we can't help you either ways

crystal wigeon
#

ah

#

lemem share it again

#

haha

umbral zealot
#

@prisma bramble quick.db doesn't use json files.

prisma bramble
#

I mean it stores data in a file called json.sqlite

#

I mean just that

umbral zealot
#

It's an sqlite file though.

#

sqlite can handle quite a load

fluid basin
#

@crystal wigeon also I just checked, there seems to be an issue with ytsr at the moment so search will not work

crystal wigeon
#

there's an issue with the error callback i guess. even tho i added try catch it still seesm to break

#

i was gonna try out the older versions

#

but

prisma bramble
#

@crystal wigeon can you put the error here?

crystal wigeon
#

just needed an extra hand

#

sure

#

one minute

prisma bramble
#

The error you get when you do "!play Despacito"

crystal wigeon
#

yep

#

and i've added try catch block but it still seems to crash

#

it does look like the error is in the package itself

sage bobcat
#

One message removed from a suspended account.

prisma bramble
#

Indeed

crystal wigeon
#

yeah

sage bobcat
#

One message removed from a suspended account.

crystal wigeon
#

discord-ytdl-corre

sage bobcat
#

One message removed from a suspended account.

unique nimbus
#

no

#

thats wrong

#

it updated today

#

lmao

sage bobcat
#

One message removed from a suspended account.

crystal wigeon
#

discord-player uses that as dependency

unique nimbus
#

so

crystal wigeon
#

dahek

sage bobcat
#

One message removed from a suspended account.

unique nimbus
sage bobcat
#

One message removed from a suspended account.

unique nimbus
#

merry christmas

crystal wigeon
#

i been trying since past 3 days xD

unique nimbus
#

Currently our dev repository is taken down due to DMCA takedown notice by RIAA.

sage bobcat
#

One message removed from a suspended account.

umbral zealot
#

Dude's literally using the example code from the website and it didn't work, I guess you'll have to ask whoever wrote discord-player

unique nimbus
#

Latest (v2020.11.01.1) downloads:
youtube-dl youtube-dl.exe youtube-dl-2020.11.01.1.tar.gz
See the right for more resources.

umbral zealot
#

Find this androz guy ๐Ÿ˜›

crystal wigeon
#

oof

unique nimbus
#

got updated today

#

so

prisma bramble
#

Try using distube

crystal wigeon
#

thanks for the update tho

#

yeah

#

so now i know it wont work even if i use an older version

prisma bramble
#

Discord-player kinda broken

crystal wigeon
#

hopefully they fix it soon

#

the package was also a beta-1

#

thanks guys

#

โค๏ธ

#

much love to the community

prisma bramble
#

Distube works perfectly, trust me

crystal wigeon
#

imma give that a try

prisma bramble
#

I'm using that for my Music Bot

crystal wigeon
#

sure, sup?

#

i did send you a code snippet the other day when you asked the same thing

#

client.user.setPresence({
activity: {
name: z!help | beta v1.0.0,
},
});

#

yes

#

you need to initialize your client first

#

which is discord client

#

replace "name"

#

i mean

#

the contents

#

to seet it with the status

#

you want

#

const discord = require("discord.js"),
client = new discord.Client({
partials: ["MESSAGE", "REACTION"],
});
client.user.setPresence({
activity: {
name: your status,
},
});

#

thats the entire code snippet

#

um, just copy paste the code i sent

quartz kindle
#

lol

crystal wigeon
#

bruh

#

am i baby sitting

#

xD

#

jk

quartz kindle
#

it still wont work because its outside a ready event lul

crystal wigeon
#

well, let him figure that out

#

no spoon feeding xD

#

youtube-dl gone, distube

#

bruh

umbral zealot
#

@earnest phoenix you need a string there not just words

crystal wigeon
#

replace 'your status' with your status string

umbral zealot
#

maybe learn a bit of JS before trying to make a bot, darling.

#

You think that's funny? smh.

quartz kindle
#

lmao

earnest phoenix
#

is it better to show custom swear words if channel is nsfw marked or spoiler it if not nsfw marked channel

umbral zealot
#

Still not a String.

prisma oriole
#

learn js

crystal wigeon
#

put " at the start and end of your sentence

prisma oriole
#

that an learn js

#

and*

crystal wigeon
#

yeah learn js

earnest phoenix
#

is it better to show custom swear words if channel is nsfw marked or spoiler it if not nsfw marked channel
@earnest phoenix anyone can tell which is better .-. idk what to do

umbral zealot
#

Strings are one of the first things you'll learn with javascript, it's day 1 stuff, it's important.

#

"Swear Words" aren't NSFW, @earnest phoenix

earnest phoenix
#

well Should i spoiler it?

#

or not

umbral zealot
#

That's up to you?

earnest phoenix
#

Ig i will spoiler it

umbral zealot
#

most people don't fucking care ๐Ÿ˜›

prisma oriole
#

yes no one || fucking || cares

crystal wigeon
#

yow pay me imma teach you js

prisma oriole
#

dude

#

read the error not the stack

#

lmao

crystal wigeon
#

ikr

prisma oriole
#

and i just realized that thats a command

crystal wigeon
#

xD

prisma oriole
#

really dude?

earnest phoenix
#

Top Thing to do first before asking for help:

  1. Read the error and try to find out the issue and fix it.
  2. if you don't know javascript basics. First learn that.
prisma oriole
#

youโ€™re gonna be racist because you dont knoe shit

#

know

#

gl with finding help after that

crystal wigeon
#

rip

prisma oriole
#

?

whole knot
#

People just try to help you but if you do not know the basics that does not make sense

crystal wigeon
#

hwo did you even find glitch

umbral zealot
crystal wigeon
#

do you know how to "hello world" on glitch?

prisma oriole
oak cliff
#

@earnest phoenix

#

-m 371615337856106498

gilded plankBOT
#

๐Ÿค Muted Mega_Hunter#4379 (@lapis aspen)

prisma oriole
#

tyty

earnest phoenix
#

rip him

prisma oriole
#

lmao

crystal wigeon
#

poor dude

prisma oriole
#

still wondering how he made that file a command

#

without any of the exporting

crystal wigeon
#

xD

umbral zealot
#

Copy/pasted from a tutorial of course.

crystal wigeon
#

when you dont know what you're doing. you really dont know what you doing

prisma oriole
#

lmaooo

umbral zealot
#

That was pretty typical tyler behaviour, unfortunately.
Doesn't want to learn, copied their entire code, gets angry when called out on it and told to learn js.

earnest phoenix
#

I remember When i first started coding. I would spam my friend's dm with issues but not be racist to him .-.

umbral zealot
#

For future reference though that wasn't racist, that's antisemitic.

earnest phoenix
#

Ah

solemn jolt
#

Why i have a error in this code

viscid gale
#

That was pretty typical tyler behaviour, unfortunately.
Doesn't want to learn, copied their entire code, gets angry when called out on it and told to learn js.
o0f

quartz kindle
#

@solemn jolt guild owners are not guaranteed to be cached

#

you need to fetch them first

solemn jolt
#

@quartz kindle how?

quartz kindle
#

let owner = await message.guild.members.fetch(message.guild.ownerID)

solemn jolt
#

ownerID

quartz kindle
#

yes, ownerID always exists

solemn jolt
#

Ok thank you

umbral zealot
#

Or just literally compare message.author.id !== message.guild.ownerID

fiery canyon
#

does anyone have an idea on how to check if a user in a guild, withiout using cache

#

in discordjs

quartz kindle
#

lmao yeah, what evie said

umbral zealot
#

@fiery canyon not without the cache no, you'd have to try to fetch the member by ID

solemn jolt
#

@umbral zealot ok thank you too

umbral zealot
#

๐Ÿ‘

fiery canyon
#

message.guild.members.fetch(id)

quartz kindle
#

well you can fetch(id,false), which is techincally not using the cache xD

solemn jolt
#

i don't what's fetch?

fiery canyon
#

i don't know why i tried that, and it still fetched a result, without the user being in the guild

quartz kindle
#

if the user is in a guild, it returns the user

#

if the user is not in the guild, it will error out

umbral zealot
#

yeah it literally throws a promise rejection error

fiery canyon
#

well yeah i was using .catch() and then returning

#

but it didnt return

#

cus right now i'm missing the server members intent, and trying to fix some bug with users being permanently cached

umbral zealot
#

fetching doesn't require the privileged intents though

#

when you fetch, it adds to the cache as well as return the user data

fiery canyon
#

yeah i believe

umbral zealot
#

but it's a promise

quartz kindle
#

@solemn jolt
.cache.get() = get it from the cache if it exists, which means its saved inside your bot, if not, returns undefined
.fetch() = get it from the cache if it exists, if not ask discord to send it to you and then save it in the cache

fiery canyon
#
await message.guild.members.fetch(id).catch(x => { ... }```
#

that's what im trying to use, yet it still do what inside the catch

quartz kindle
#

@umbral zealot evie.dev is your website?

solemn jolt
#

@quartz kindle thankyou

umbral zealot
#

yes it is!

pale vessel
#

evie boomer /s

umbral zealot
#

lol

quartz kindle
#

@fiery canyon js let user = await message.guild.members.fetch(id).catch(x => null); if(user) { console.log(user) } // user will be null if the fetch failed

#

@umbral zealot awesome, very nice content

umbral zealot
#

Danke ๐Ÿ™‡โ€โ™€๏ธ

quartz kindle
#

bitte :3

safe creek
#

Does anyone know DBFD?

quartz kindle
#

i know what it is but never used it

safe creek
#

Iโ€™m trying to make an command thatโ€™ll allow users to redeem an code and get items or Mahoney but Iโ€™m not sure how to make it

#

Iโ€™m still pretty new to it

wicked pivot
#

hello, is anyone using the evaluate party of puppeteer?

quartz kindle
#

does dbfd have any kind of persistent storage or database system?

safe creek
#

No itโ€™s just a code app for mobile to make bots

#

Well Iโ€™m not sure actually

#

It saves the code onto your bot but you canโ€™t access it apart from the code youโ€™ve written

#

It uses variables tho

#

And hosts your bot

fiery canyon
#

bruh it still doesnt null if the user isn't in the guild

#

how is this possible

#

the user completely left the guild, and yet it fetches their object

subtle kiln
#

maybe it still in the cache. have you tried to fetch and put the force boolean to true (disable cache)

fluid basin
#

have you considered making your own bot from scratch instead of using a bot designer? @safe creek

#

even on mobile there are quite a few ways to code (albeit not as great as desktop)

subtle kiln
safe creek
#

have you considered making your own bot from scratch instead of using a bot designer? @safe creek
@fluid basin itโ€™s not a bot designer?

#

I made it from scratch?

fiery canyon
#

maybe it still in the cache. have you tried to fetch and put the force boolean to true (disable cache)
you mean like .fetch(id, true)?

fluid basin
#

oh wait

subtle kiln
#

.fetch(id, { force: true }) actually

safe creek
#

@fluid basin

solemn latch
#

Db script?

crystal wigeon
#

Woah

fluid basin
#

yeah ok

sick condor
#

That's discord bot designer?

fluid basin
#

but you're still limited to many things

safe creek
#

Yes but I asked support and they said I could make an command and allow users to redeem codes

#

Just not sure how

quartz kindle
#

well, you can always store your codes in discord xDDD

sick condor
#

Is it possible to use the top.gg API like the vote API

#

On discord bot designer?

fluid basin
#

I don't think so

solemn latch
#

Like voting for your bot?

sick condor
#

Mhm and getting like

quartz kindle
#

should be possible

sick condor
#

2x boosters idk

solemn latch
#

No, the api doesn't support vote commands

fluid basin
#

do they even allow external packages?

sick condor
#

I'll contact them since I'm an alpha tester

quartz kindle
#

doesnt dbd allow js code?

sick condor
#

No, the api doesn't support vote commands
@solemn latch in some bots when u vote them u get perks

#

doesnt dbd allow js code?
@quartz kindle it does

fluid basin
#

allowing js does not mean you get access to installing and managing packages

sick condor
#

^^^^

quartz kindle
#

then you can always use the built in http modules, since it runs on nodejs

fluid basin
#

and it might not even be the full subset of nodejs

sick condor
#

Well they will soon add packages I think

solemn latch
#

Vote rewards use the webhooks @sick condor

sick condor
#

Oh

#

Okayy

quartz kindle
#

dbd is based on discord.js isnt it?

sick condor
#

Yeah

solemn latch
#

It was on v11 not long ago right?

fluid basin
#

well again, the code might not be natively executed

sick condor
#

It has its own code as well

quartz kindle
#

discord.js uses node-fetch internally

#

so node-fetch should be included and accessible

sick condor
#

Exactly

quartz kindle
#

try doing require("node-fetch") with js code

sick condor
#

It works

quartz kindle
#

then you can use the api

sick condor
#

Bet bet

#

Thank i

#

Thank u*

quartz kindle
#

now try using require("http")

sick condor
#

Bruh android keyboards be like

#

Sec let me see

#

Doesn't work

quartz kindle
#

hmm really

sick condor
#

maybe I haven an issue on the code hold on let me remake it

sick fable
#

So I made one command on which it changes the status and I want it that only I can use that command. So I tried coding it but it's saying me like You don't have perms to set status. Lemme send the code too.

Language= discord.py

quartz kindle
#

if http works, then you can use webhooks as well

solemn latch
#

Honestly I thought he was asking if he could use top.gg api like its voteapi

sick fable
#
async def changepresence(ctx,*,text):
    		if ctx.author.id == "707198291246579732":
    			await client.change_presence(status=discord.Status.idle, activity=discord.Streaming(name = f"{text}" , url = "https://www.twitch.tv/pokimane"))
    		await ctx.message.add_reaction('โœ…')
    		embed = discord.Embed(title = "Success!" , description = f"I have changed the Bot Presence to {text} !" , colour = ctx.author.colour)
    		await ctx.send(embed=embed)
    	else:
    		await ctx.send("You don't Have Perms!")```
#

xD leave that url

#

Someone help me lol

coral stirrup
#

772468608697761802

#

thats ur dc id

#

not the one you entered

sick fable
#

Ok

pale vessel
#

no, the id is correct

quartz kindle
#

streaming pokimane lmao

pale vessel
#

IDs are ints in python

#

remove the quotes

coral stirrup
#

huh why it gives me 772468608697761802 as his id?

quartz kindle
#

for me it gives 707198291246579732

#

lmao

pale vessel
#

you copied the message id

coral stirrup
#

ohh fuck

quartz kindle
#

lmao

coral stirrup
#

aight imma kms see ya

prisma oriole
#

i have strict null checks on

#

so I used ? but typescript is being mean

subtle kiln
#

Do you use the last version of TS ?

prisma oriole
#

im using 3.9.7

#

also, i've never had this issue before

subtle kiln
#

I'm using 4.0.3. The null collapsing (I think it's how it's named) optional chaining is pretty new so maybe by upating to TS4 it would fix it

prisma oriole
#

ok, will go ahead and give it a try

sick fable
#

for me it gives 707198291246579732
@quartz kindle lmao

subtle kiln
#

I'm using 4.0.3. The null collapsing (I think it's how it's named) optional chaining is pretty new so maybe by upating to TS4 it would fix it
@subtle kiln my bad, it was introduced in 3.7 and had a breaking change in 3.9. It's indeed pretty new but updating to 4.0 should change nothing

onyx summit
#

Is this when running the typescript compiler or when running the transpiled JavaScript?

sick fable
#

@quartz kindle So is there any way by if I message to change the bot presence?

hollow sedge
#

@sick fable flaze told you to remove the quotes around the ID because it is an int, not a string

sick fable
#

I got it. I was busy playing cod

#

: )

hollow sedge
#

So is there any way by if I message to change the bot presence?
@sick fable then why'd you say this?

sick fable
#

Because my mind was fluctuating

hollow sedge
#

oh

sick fable
#

Thanks!! @pale vessel @hollow sedge

#

It worked

#

I am streaming Pokimane flosh

#

I hope that my bot doesn't get rejected

#

Lol

quartz kindle
#

simp

solemn latch
#

ez no decline

sick fable
#

Thanks :D @solemn latch

#

simp
@quartz kindle Shush ๐Ÿคซ

quick ridge
#

can i get spotify join link if i get

#

how ?

earnest phoenix
#

if anyone could help me

quartz kindle
#

kindly explain what you need help with

fiery canyon
#

are intents needed for fetching a guild member without cache

earnest phoenix
#

i would like to know how many people are in a server

quartz kindle
#

no

fiery canyon
#

cus my client still magically finds the user, even when they're not in the guild

upper crescent
#

hey i am using disordgo anyone knows how to use PermissionOverwrites struct i am stuck on Type

earnest phoenix
#

and i didnt realy understood how this work

quartz kindle
#

@earnest phoenix which library are you using?

quick ridge
earnest phoenix
#

im using request

quartz kindle
#

you're trying to use the rest api directly?

#

without a gateway connection?

earnest phoenix
#

well i tryed with a get

#

and its said smthing like unautorize

#

code 5001

quick ridge
#

i using user.presence.activities

upper crescent
#

hey i am using disordgo anyone knows how to use PermissionOverwrites struct i am stuck on Type
on go doc it says that Type is string type but in developer portel i saw it was int (could be either 0(role) or 1(member))

earnest phoenix
#

{"message": "Missing Access", "code": 50001}

#

this is the error code @quartz kindle

#

https://discordapp.com/api/v8/guilds/769916241799413820/members this is the url i made a get one

#

on

pale vessel
#

did you provide the authorization header

earnest phoenix
#

yes i did authorization : token_of_bot

quartz kindle
#

is the bot a member of that guild?

earnest phoenix
#

yes

#

tested with several id of serv tho

quartz kindle
#

does your bot have the server members intent toggled on in the dev portal?

earnest phoenix
#

its isnt by dfault?

quartz kindle
#

not anymore

earnest phoenix
#

ohh

#

that prob wh

#

why

#

may you help me with smthing else realy quick?

#

i wanted to do thing on several bot in one run

#

is there a ways to do it?

nocturne grove
#

Hey, should I just fix this error by doing what it says? I'm caching members and that's what it comes from.

-'/channels/xxxx/messages?limit=1' get```
solemn latch
#

someone has 6 bots in a single process iirc.

#

i remember it being a nightmare for them however

earnest phoenix
#
#---------------
import discord

#---------------
tokens = []
class Bot():
    def __init__(self):

        bot = discord.Client()
        @bot.event
        async def on_ready():
            print("done")
            await bot.logout()

        for i in range(len(tokens)):
            TOKEN = tokens[i]
            bot.run(TOKEN)


bot = Bot()```
#

tryed like this

#

but didnt work

quartz kindle
#

you need to create a separate client for each

earnest phoenix
#

its stuck at 2nd by telling me sys:1: RuntimeWarning: coroutine 'Client.run.<locals>.runner' was never awaited

#

how could i do that?

quartz kindle
#

this is where the client is created bot = discord.Client()

earnest phoenix
#

ye but cant i destroy client once its done?

#

like

#

delete and recreat with a new token?

quartz kindle
#

well, you can, if you want to run one at a time

earnest phoenix
#

ye

#

that the idea

quartz kindle
#

but its better to create a new client, to make sure the client is clean

earnest phoenix
#

well i would prefere do it on at time for my pc

#

its would be easier

quartz kindle
#

also, if all you want is to use the rest api, you dont need to connect to the gateway

earnest phoenix
#

how do i "destroy" a client?

#

im bad in english can you explain your sentence please

quartz kindle
#

check the docs

earnest phoenix
#

well i didnt found on the docs that why i ask help ๐Ÿ˜“

pale vessel
#

search for destroy and you'll find it lmao

quartz kindle
earnest phoenix
#

tryed both logout and close

#

and its gave me an error

quartz kindle
#

what error

earnest phoenix
#

sys:1: RuntimeWarning: coroutine 'Client.run.<locals>.runner' was never awaited

quartz kindle
#

you didnt await bot.run()

earnest phoenix
#

yes but if i do await bot.run() its say await outside a asyncio function

#

should i do an other bot.run?

pale vessel
#

wait what

#

oh

earnest phoenix
#
#---------------
import discord

#---------------
tokens = []
class Bot():
    def __init__(self):

        bot = discord.Client()
        @bot.event
        async def on_ready():
            print("done")
            await bot.logout()
            for i in range(1,len(tokens)):
              TOKEN = tokens[i]
              await bot.run(TOKEN)
        

bot.run(tokens[0])
bot = Bot()```
#

like this?

pale vessel
#

what are you doing

#

why is tokens a list

earnest phoenix
#

cause there is several bot

quartz kindle
#

he wants to run multiple bots, one at a time, execute an api call then destroy the client

cerulean pebble
#

hmmm

earnest phoenix
#

?

#

like i want get info on serv where the bots are in order to make stats and i need them to do bunch of thing

#

then

#

log off

#

and do with next bot

cerulean pebble
#

F

#

the problem in this line

#

@quartz kindle hello no time no see ๐Ÿ™‚

#

can you help me fix this problem

quartz kindle
#

owners are not guaranteed to be cached

cerulean pebble
#

when a guild kick my bot this error happened and my bot start to reset

#

owners are not guaranteed to be cached
@quartz kindle 2 days ago it is still fine

quartz kindle
#

you need to fetch the owner

cerulean pebble
#

hmm how :)))

#

i do not touch the code for 6 months ๐Ÿ™‚

#

btw

onyx summit
#

Probably because of intents?

earnest phoenix
#

oh well i need smthing like this

cerulean pebble
earnest phoenix
#

but that do several bot

cerulean pebble
#

@earnest phoenix it is just happened with my bot 30 mins ago

#

*was

earnest phoenix
#

well your script run 1 bot or its run several bot?

#

like its give stats of 1 bot

#

or of several one?

cerulean pebble
#

1

earnest phoenix
#

oh well not exactly what i need

obtuse jolt
#

So I have 2 shards, shard 1 there is a guild, shard 2 wants to see if a user has a role in that shard, how would I do that

cerulean pebble
#

20 mins ago

#

but 20 mins later ๐Ÿ™‚

pale vessel
#

So I have 2 shards, shard 1 there is a guild, shard 2 wants to see if a user has a role in that shard, how would I do that
@obtuse jolt fetchClientValues(), i guess

hollow sedge
#

woah that's a ton of users

cerulean pebble
#

help Shiro-chan ๐Ÿ™‚

prisma bramble
#

@hollow sedge trust me, users isnt a great deal. Servers is

hollow sedge
#

@hollow sedge trust me, users isnt a great deal. Servers is
@prisma bramble 1,820 servers is still a lot

quartz kindle
#

@cerulean pebble you need to fetch guild owners, otherwise they may not exist in the bot's memory, because discord doesnt send them by default, you need to ask discord to send them to you

cerulean pebble
#

the question why 20 mins ago everything still fine

quartz kindle
#

await guild.members.fetch(guild.ownerID)

cerulean pebble
#

replace guild.owner.user.tag ?

#

or replace all the line

quartz kindle
#

you dont need to replace it

#

you just need to fetch it before trying to use guild.owner

cerulean pebble
#

so add it where ?

quartz kindle
#

before trying to use guild.owner

cerulean pebble
#

can you write this line for me ?

#

i am lagging :))

hollow sedge
#

he already did lol

pale vessel
#

lmao

cerulean pebble
#

:)))))

#

2020-11-01T15:42:03.038769+00:00 app[worker.1]: stats 299Users,48957Channels,1820 Servers!

#

270 000 ->299 :))

hollow sedge
#

? what's your point

#

we already knew there was a problem

#

await guild.members.fetch(guild.ownerID)

#

from tim

cerulean pebble
#

we already knew there was a problem
@hollow sedge from discord ?

hollow sedge
#

no, we already knew there was a problem with your bot

obtuse jolt
#

@quartz kindle So I have 2 shards, shard 1 there is a guild, shard 2 wants to see if a user has a role in that guild, how would I do that

cerulean pebble
#

oh i discord anything

quartz kindle
#

@obtuse jolt broadcasteval

obtuse jolt
#

I tried to use broadcast eval and nothing happened

#

Maybe I just donโ€™t know how to use it

#

How would I do it

pale vessel
#

what did you try

obtuse jolt
#

Well when I tried broadcast eval for the first time I tried console.log and nothing happened

quartz kindle
#

broadcastEval returns a promise with an array

obtuse jolt
#

How do I use broadcast eval

quartz kindle
#
let results = await client.shard.broadcastEval("if(this.guilds.cache.has('guild id here')) { return 'yes'; }")
console.log(results) // [undefined,"yes"] // if the guild exists in shard 1 but not in shard 0
earnest phoenix
#

tim may you help me ๐Ÿ˜…

#

i realy dont see how to do

cerulean pebble
#

well fix like this right ?

quartz kindle
#

@earnest phoenix sorry, i dont use discord.py so i dont know much about how to properly kill it

earnest phoenix
#

ok

cerulean pebble
#

@earnest phoenix use JS better ๐Ÿ™‚

quartz kindle
#

@earnest phoenix what exactly are you trying to do tho, like what do you want the bot to do before killing it?

earnest phoenix
#

i dont know a shit about js sadl

#

get bunch of info (didnt choosed all info yet) but for exemple the number of member

#

the owner id

quartz kindle
#

@cerulean pebble that will likely produce a weird result but try it

earnest phoenix
#

and thing like that

cerulean pebble
#

i will

#

but it is right ?

#

how to put await in that ?

quartz kindle
#

@earnest phoenix depending on the info you want, you might not need to connect it at all, you could get it from the rest api

earnest phoenix
#

well i tryed api but i dont rly understand it ๐Ÿ˜…

#

{"message": "Missing Access", "code": 50001}
this is the code i get when i try the url for the number of member

quartz kindle
#

how many times are you going to run this job?

#

like how often do you want to update the stats

earnest phoenix
#

every few day

quartz kindle
#

ah ok

earnest phoenix
#

not real time stats

#

why?

#

but i will need run the get for each serv my bot is in

#

for each of my bot

quartz kindle
#

i would try something like this ```js
import discord
tokens = []

for i in range(1,len(tokens)):
client = discord.Client()
@client.event
async def on_ready():
print('client {0} logged in'.format(i))
client.run('your token here')

#

but im not a python user so idk if thats correct

earnest phoenix
#

ok let me try this

quartz kindle
#

gather the stats you want inside the ready event, and once you got stats for all bots, just exist the process

obtuse jolt
#

ahaha I just broke my console

zenith knoll
#

(node:22752) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'send' of null
at Client.<anonymous> (D:\dbots\EyeBot Security\index.js:21:17)
at Client.emit (events.js:315:20)
at Object.module.exports [as GUILD_CREATE] (D:\dbots\EyeBot Security\node_modules\discord.js\src\client\websocket\handlers\GUILD_CREATE.js:33:14)
at WebSocketManager.handlePacket (D:\dbots\EyeBot Security\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (D:\dbots\EyeBot Security\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (D:\dbots\EyeBot Security\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (D:\dbots\EyeBot Security\node_modules\ws\lib\event-target.js:125:16)
at WebSocket.emit (events.js:315:20)
at Receiver.receiverOnMessage (D:\dbots\EyeBot Security\node_modules\ws\lib\websocket.js:797:20)
at Receiver.emit (events.js:315:20)
(node:22752) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:22752) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

#

guild.owner.send()

#

i have ALL intents in ws

pale vessel
#

show code

obtuse jolt
zenith knoll
#

guild.owner.send(Hey there, ${guild.owner})

#

@pale vessel

pale vessel
#

are you sure the owner is cached?

#

you can have the intents, but that doesn't mean that the client cached the guild owner

#

unless you explicitly enable fetchAllMembers in ClientOptions

earnest phoenix
#

๐Ÿ˜ซ that rly dosnt work

cerulean pebble
#

@quartz kindle it's not work

#

i checked

#

the problem with user

pale vessel
#

what doesn't work?

cerulean pebble
#

"user"

sudden geyser
#

you sure the owner is cached

cerulean pebble
#

TypeError: Cannot read property 'user' of null

pale vessel
#

yeah

cerulean pebble
#

i can not imagine what were happen

#

@pale vessel Tim give me a option but it is not workerd

obtuse jolt
#

how do I manually push my guild count?

pale vessel
#

what did you use?

#

oh and authorization

obtuse jolt
#

isnt there a thing on the module?

pale vessel
#

yeah

#

i thought you asked that since the module is deprecated

#

but you can use the module, yes

obtuse jolt
#

it is?

#

damn

pale vessel
#

it is, but it should still work

#

nothing's been changed, afaik

obtuse jolt
#

what is the thing on the module for manual pushing?

pale vessel
#

postStats? not sure

obtuse jolt
#

would it say on the module npmjs page?

pale vessel
#

it didn't, just checked

obtuse jolt
#

damn

pale vessel
obtuse jolt
#

awesome thanks

quartz kindle
#

@cerulean pebble i told you, you need to fetch the owner

#

BEFORE trying to use it

#
guild.owner.id // error
await guild.members.fetch(guild.ownerID)
guild.owner.id // works
#

you can also do ```js
let owner = await guild.members.fetch(guild.ownerID)
owner.id // works

obtuse jolt
#

hey @quartz kindle how would I add up all the values in an array

solemn latch
#

reduce?

earnest phoenix
#

reduce

#

damn

pale vessel
#

reuse

#

damn

earnest phoenix
#

reeeeeeeeee

quartz kindle
#

redux

pale vessel
#

you use redux?

earnest phoenix
#

๐Ÿšฎ

pale vessel
#

recycle, yes

quartz kindle
#

trash

earnest phoenix
#

how can I get the background-image CSS element to work on my bots page? Its the only component that doesn't work/load properly

quartz kindle
#

where do you want to put the background?

earnest phoenix
#

I have it associated with the body but that didnt work. Tried to set it as a class on the body tag but that didn't work

#

its just a linear gradient , not an image

quartz kindle
#

but do you want to put it in the body of the website?

#

if so, the body selector should work

pale vessel
#

for me i had to use #bot-details-page

earnest phoenix
#

I dont want to set it as that. here is my descript part on my bots page. The dark grey area is the body and there should be a linear gradient loaded onto that

quartz kindle
#

the dark gray area is not the body

#

there is only one body per page

#

top.gg's body is the one i showed you in the pic above

cerulean pebble
#

let owner = await guild.members.fetch(guild.ownerID)
2020-11-01T16:28:36.959534+00:00 app[worker.1]: ^^^^^
2020-11-01T16:28:36.959535+00:00 app[worker.1]:
2020-11-01T16:28:36.959535+00:00 app[worker.1]: SyntaxError: await is only valid in async function

#

i forget to mention this

#

:))

quartz kindle
#

make the function async

earnest phoenix
#

For the bots description, I added my own HTML/CSS but the background-image component doesn't load.

quartz kindle
#

yes, but there is only 1 body

#

you cant put another body inside it

#

your whole custom html should not have body nor head elements

earnest phoenix
#

ok, that fixed it, thank you Tim ๐Ÿ˜‚

obtuse jolt
cerulean pebble
#

@quartz kindle i tired at least 10 times and discorvered that

#

and btw

#

the bot is normal if someone kick her and add her after 5 mins turn on

#

like delay time

#

so i have a option that i will make 2 cases

reef carbon
#
@client.check
async def user_blacklist(ctx):
    if ctx.author.id == 475315771086602241:
        await ctx.send("You have been blacklisted from using ฮž X 0")
    else:
        return
```Does anyone know why this says check failed?
sudden geyser
#

It has to return True to signal the user passed.

#

You returned None.

#

On both occasions.

reef carbon
#

yeah I fixed it

#

thanks for answering tho

quick ridge
#

how can i get attachments url

#

i sent

cerulean ingot
#

im making an all in one bot what should i call it

obtuse jolt
#

@quartz kindle is it possible to have multiple events for colleting messages from shards in the manager each with their own purpose?

cerulean ingot
#

any other python devs here

sudden geyser
#

yes

cerulean ingot
#

sick

quartz kindle
#

@obtuse jolt sure, why not

obtuse jolt
#

how would I be able to do it?

#

I don't get that

#

the sending to the custom one and receiving it too

quartz kindle
#

give it a name field or something to identify it

#

then check this field to figure out which one is it

obtuse jolt
#

@quartz kindle

cerulean pebble
#

@quartz kindle i do not understand why i am open bot she lost 5 mins to know what user is and the command work

#

like first 5 mins command error and come to normal in 6th to return

quick ridge
quartz kindle
#

@obtuse jolt if you want to create custom events, you have to process them in the message listener and re-emit them

#

for example ```js
shard.on("message", data => {
shard.emit(data.type,data.content)
})

#

and then you send it an object containing a type field

#

client.shard.send({type:"guilddata",content:{memberCount:999}})

jade shell
#

There is not space after comma CattoCry

quartz kindle
#

@cerulean pebble i already told you why lol

#

do you not understand how caching works?

cerulean pebble
#

@cerulean pebble i already told you why lol
@quartz kindle sorry :/

#

but i tired your code :/ but did not bring any effective

quartz kindle
#

show code

quick ridge
#

tim mate

#

can u help me

orchid atlas
#

Best way to host your bot?

unique nimbus
#

VPS

orchid atlas
#

Google?

cerulean pebble
#

@quartz kindle i understand the problem

opal plank
#

addFields()

#

pls

cerulean pebble
#

it is happened when a user add bot when my bot not complete the fetching all of 255 000 users

quartz kindle
#

i already told you

#

make the function async, and fetch the owner

#

async guild => {
await guild.members.fetch(guild.ownerID)

cerulean pebble
#

hmm sir i will try again

quartz kindle
#

@quick ridge attachments dont have a url until after they are sent to discord

#

so you cannot show the attachment url there

opal plank
#

also guildCount and bann...whatever that is, are redudant

#

you're declaring 2 variables for the same thing

cerulean ingot
#

i dont know what to call my bpt

#

bot

orchid atlas
#

@cerulean ingot

cerulean ingot
#

thanks

#

i got bird....

orchid atlas
#

lmao

#

thats how i got my bot name at least

#

you can modify them a bit if you want

#

works out great

#

or translate a word in to latin and work from there

opal plank
#

i would probably put more commitment than that tbh

cerulean ingot
#

whats your bot i wont steal it lmao

opal plank
#

at least something unique or that's similar to what your bot does

cerulean ingot
#

yeah

orchid atlas
#

^^

cerulean ingot
#

its an all in one bot

orchid atlas
#

take somthing for all in one or everything or something like that

opal plank
#

name is one of the most important things about your bot

#

i'd recommend thinking thoroughly about it

blissful coral
#

A1?

#

All -> 1

#

All in 1

#

@cerulean ingot

cerulean ingot
#

ooo thats cool

blissful coral
queen crescent
#

using moment, how can i change the time zone to GMT? (nodejs)

#

moment().format('dddd Do MMMM YYYY H:ma') is 8hours behind my timezone

subtle kiln
#

I'm trying to figure out how Discord permissions work (not sure if it's the correct channel but it's related to the dev of my bot). For a test I removed all permissions of @everyone on a server and created a new role "member" that can see channels, read/write, etc... However this role can't see any channel. Why?

blissful coral
#

because if @ everyone is disabled, then member has to be enabled

obtuse jolt
blissful coral
#

@ everyone will override member if member does not forcefully say that it can do it

cerulean ingot
#

@blissful coral do you code in opython

blissful coral
#

js

subtle kiln
#

@ everyone will override member if member does not forcefully say that it can do it
@blissful coral but the "member" role has the permissions to see channels and read/write

blissful coral
#

If someone knew they would respond to your question

subtle kiln
#

moment().format('dddd Do MMMM YYYY H:ma') is 8hours behind my timezone
@queen crescent use moment-timezone instead of moment and do something like that:

moment(date).tz(this.effectiveTz).locale(this.effectiveLang).format(format)
blissful coral
#

@subtle kiln

@everyone Wrong
member Check

subtle kiln
#

sorry but I don't really understand what you are saying

blissful coral
#

Check mark all perms for member in the channel

#

if all everyone perms are xed'

#

give the person member they can see channel

quartz kindle
#

@obtuse jolt sure

queen crescent
#

@subtle kiln this.effectiveTz would be like this.effectiveTz = 'GMT' right?

obtuse jolt
#

I tried it but nothing happened @quartz kindle

orchid atlas
#

#AddDevelopment2

subtle kiln
#

That would work but that's not my question. The channel permissions are neither on X nor V, just the default value /. What I don't understand is that the user has the permissions, the channel permission don't overwrite its permissions but in the end, he don't have the permission to see the channel and I don't know why (sorry for poor english)

#

@subtle kiln this.effectiveTz would be like this.effectiveTz = 'GMT' right?
@queen crescent you replace this.effectiveTz by the value that you want like "UTC" or "Europe/Paris"

blissful coral
#

If everyone is at X and member is at / then member will not override it because it is already being denied by everyone

#

neutral means it will check for permissions on all roles of the user (including @everyone) and then check it yes or no

subtle kiln
#

the member isn't at X in the channel permission

blissful coral
#

is @everyone?

subtle kiln
#

neither

quick ridge
#
message.channel.createWebhook(isim , avatar)
.then(webhook => webhook.edit({name: isim, avatar: avatar} )
.then(wb => { 
const hook = new Discord.WebhookClient(wb.id, wb.token); 
hook.send(yazi)
}).then(hook.delete({ timeout: 2000, reason: 'HOOK silinmesi' }) )
.catch(console.error)) ```
#

i cant delete webhooks

#

with this code

#

why ?

earnest phoenix
#

My bot is no longer playing YouTube music. Error Code: write EPIPE

Please help me. Thank you ๐Ÿ™‚

quartz kindle
#

the chain is wrong