#development

1 messages · Page 1294 of 1

umbral zealot
#

You are

#

Just stop

#

trolling

earnest phoenix
#

IM 13 AND IM STUPID IM A PEANUT BRAIN IDK HOW TO MAKE A BOT I NEVER HAVE MADE A BOT

pale vessel
#

jeez

misty sigil
#

can you like

earnest phoenix
#

Just leave me one

misty sigil
#

type normally

umbral zealot
#

dude you don't make a bot by adding it to a bot list

misty sigil
#

^

misty sigil
#

you make it by learning the language

#

that you wanna make it in

#

inb4 they say they already know english

slender thistle
#

First, calm down. Second, you need to learn a programming language. Once that's done, feel free to use a library for the programming language you learned.

strong tundra
#

wait i don't think that'll work

misty sigil
#

rust

strong tundra
#

lol

#

twilight is pretty advanced compared to some other libs

umbral zealot
boreal iron
#

First, calm down. Second, you need to learn a programming language.
Should have told him, secondly go to school and learn something useful.

umbral zealot
#

Programmers and our puns, man. 😂

misty sigil
#

yea thats amazing

strong tundra
#

yeah there's a bunch of those

#

there's a time lib that has a couple cool hidden features

#

specifically the end of time stuff

umbral zealot
#

I mean I was specifically talking about how Rust is caused through Oxidizing of iron

strong tundra
#

oh lol

#

i thought you were talking the pop culture references in examples

umbral zealot
#

nope. Just noting that we have things like coffeescript, mocha, and chai, for JAVAscript libraries

strong tundra
#

now im wondering of there's a rust game lib for rustlang

sudden geyser
#

javascript

strong tundra
#

aww i guess not

#

lol

#

metal graphics lib

thin turret
#

Scripted Java

snow urchin
#

How can I get 2 inline embeds ontop of another 2 instead of 3 on 1

earnest phoenix
sudden geyser
#

Callum could you elaborate on what you mean

snow urchin
#

If I set 4 embed fields to be inlined, it would do 3 on the top line and 1 on the bottom. I want 2 on top, 2 on bottom

sudden geyser
#

I don't think that's possible due to the way Discord renders it to the client

snow urchin
#

F

sudden geyser
#

Maybe you could use a little hack by making a blank field then adding your two fields below it.

#

Keep in mind that it probably won't look good on mobile as every field is on a separate line.

earnest phoenix
#

embeds can't be inlined are you thinking of fields lol

#

also

#

you're at the mercy of screen resolution

#

however you can fake the effect with people who don't have ooga booga monitors

#

create 6 inline fields in total

#

3 at the top, 3 at the bottom

#

set the title and the value of the one in the middle to a zero width space

autumn aspen
earnest phoenix
#

@snow urchin doing the thing i said above you can achieve this effect

compact oriole
#

that bot name

autumn aspen
#

that bot name
@compact oriole lol its AnimeMovieN'SerieFinder

snow urchin
#

and how can I get the 0 width space value, as they cant be empty

earnest phoenix
#

google it

compact oriole
#

didn't talk to you @autumn aspen

autumn aspen
#

didn't talk to you @autumn aspen
@compact oriole -_-

#

(-_-)

umbral zealot
#

@autumn aspen I don't see a problem. The bot is showing stats, what else were you expecting?

#

Again: learn to phrase your questions with information that's useful, dammit

dark kestrel
#

hey is this true

autumn aspen
#

@autumn aspen I don't see a problem. The bot is showing stats, what else were you expecting?
@umbral zealot it was a joke that wasnt even funny

dark kestrel
#
1+1 = 2

??

compact oriole
#

well it is not true if you run it in a lang

earnest phoenix
#

nope

compact oriole
#

this would be true

#

1 + 1 == 2

earnest phoenix
#

1+1 is 1 mmLol

fluid basin
#

no its 11

earnest phoenix
#

boolean's logic

slender thistle
#

10

dark kestrel
#

ya guys are all idiots

1 + 1 = 10
#

@slender thistle NICE

#

10+1 = 11

umbral zealot
#

@autumn aspen This is a support channel not a meme channel man. You've already shown enough help vampirism that any stupid question you ask is going to be assumed as a stupid question, not a joke.

dark kestrel
#

11 + 1 = 100

#

100+1 = 101

#

and bla bla

slender thistle
#

slowly getting off-topic though

violet mesa
#

is there any way to make my page aproved faster cause ive been waiting for a while or all i can do is just wait

#

more

misty sigil
#

just wai t

violet mesa
#

ok

sudden geyser
#

You submitted your bot like 10 days ago right

compact oriole
#

@violet mesa you only added it a few weeks ago

#

wait 10 days

#

wait another 43 days+

stable eagle
#

Siri, whats 53 divided by 7

misty sigil
#

7.5

modest smelt
#

How can I make a role when I join a server called Muted, and change all the channel's permissions so that Muted can't talk? (in discord.py)

earnest phoenix
#

@modest smelt well first off you need to create the role (duh) using Guild.create_role. then iterate over all channels and use TextChannel.set_permissions to alter the permissions for the muted role to send_messages=False. And dont forget to move the role higher in the role hierarchy to above all roles you want to be able to mute

modest smelt
#

@earnest phoenix when i try creating the role it doesn't work

#
try:
  role = discord.utils.get(ctx.guild.roles, name="Muted")
except Exception:
  role = await ctx.guild.create_role(name="Muted")
  role = discord.utils.get(ctx.guild.roles, name="Muted")    
earnest phoenix
#

@modest smelt that doesn't work because utils.get doesn't raise an exception when no role is found. It'll just return None

modest smelt
#

So what should i do?

earnest phoenix
#

Try to get the role usinf utils.get and check if what is return is None. Then create role

modest smelt
#

ok

earnest phoenix
#
  • Bot doesn't react to any message, that includes these words
  • No message in the terminal
const Discord = require('discord.js');
const client = new Discord.Client();
const token = "top secret info";

const bot = new Discord.Client({disableEveryone: true});

client.login(token);

bot.on("ready", async () => {
    console.log('${bot.user.username} jest gotowy');
    bot.user.setGame("na siłowni w piwnicy");
});

client.on('message', async message => {
    if(message.author.bot) return;
    if(message.channel.type === "dm") return;

    let randomMessages = [ `bo tak`, `ja tam nie wiem`, `spytaj się boga ojca wszechmogącego`, `w internetach poszukaj`, `a co ja jakaś encyklopedia jestem?`, `bo ja tak powiedziałem i tak ma być`, 'nie chcesz wiedzieć...', 'no bo wiesz no... :sunglasses::call_me:'];
    if(message.content.includes("sikorze" & "czemu"))
    message.channel.send(randomMessages[Math.floor(Math.random() * (randomMessages.length - 1))])
});

Is anybody able to help me? 🥺

#

isn't login blocking

#

Yes

#

you also mix and match between client and bot

#

where did you copy that code from

#

Login is blocking and mixing bot/client will indeed only cause more.issues dboatsHypersweat

modest smelt
#

@earnest phoenix does it return "None" or None

earnest phoenix
#

None

#

from a youtube tutorial 😃
what should i do then

modest smelt
#

like string None or regular none

#

ok

earnest phoenix
#

a single ampersand is a bitwise and

#

It never returns None as a string

#

this is also not how programming works lol
@earnest phoenix what you mean?

modest smelt
#
role = discord.utils.get(ctx.guild.roles, name="Muted")
if role == None:
  role = await ctx.guild.create_role(name="Muted")
  role = discord.utils.get(ctx.guild.roles, name="Muted")    
else:
  return
#

is that ok?

earnest phoenix
#

oh

#

double ampersand then?

#

still not how it works

#

aaaaaa

#

@modest smelt yes and no. Preferably use if role is None. Also, you dont need the 2nd utils.get

#

Hi. my bot is logged in but no responding? when i tried changing the token it works perfectly

modest smelt
#

@modest smelt yes and no. Preferably use if role is None. Also, you dont need the 2nd utils.get
@earnest phoenix i got it to work

earnest phoenix
slender thistle
#

create_role returns the created role, no need to get it again

modest smelt
#

now how do i set all the channel's permissions so Muted role can't talk?

earnest phoenix
#

Iterate over the channels and use TextChannel.set_permissions

#

@slender thistle any other lazy dev suggestions? 0_KEKLaugh

slender thistle
#

hahaha none so far, I'll tell you if I have any 😂

modest smelt
#

ok

earnest phoenix
dark kestrel
#

Anyone can give an idea to make a web dashboard

earnest phoenix
#

it's more complex than what you think

#

what does ... mean in JS

sudden geyser
#

It's called the spread operator.

earnest phoenix
#

thanks

#

I need help with reactions,

async def on_raw_reaction_add(self, payload):

on_raw_reaction_add doesn't seem to have a emoji count...
but on_reactrion_add doesn't work on uncached messages..

My bots in development and always rebooting.. how to do i get the count of a emoji on a old message?

sudden geyser
#

Fetch it?

slender thistle
zenith knoll
#

yo

#

so im tryna remove all roles from a user but one

#

and I can seem to be able to do it

#

i get

#

data.roles.map is not a funciton

#

nvm

#

i gave it an var

#

i need to give a array

#

thanks

compact oriole
earnest phoenix
#

nvm

#

so im tryna remove all roles from a user but one
@zenith knoll can you explain your question better?

zenith knoll
#

it works

#

i forgot the array brackets

#

lmao

earnest phoenix
#

lol

zenith knoll
#

bc it only accepts arrays

#

not vars

earnest phoenix
#

you can pass Collections too iirc

#

lemme go see the docs quickly

zenith knoll
#

yea

#

so

#

i did

#
victim.roles.set(communityRole)
#

should have done

#
victim.roles.set([communityRole])```
earnest phoenix
#

@zenith knoll wait are you looping over every single member and assigning them the role if they aren't the user you said you don't wanna give a role to?

zenith knoll
#

no

#

one member only

#

victyim is a member

#

the one u @ ed

#

it works

#

lmao im not a copy paste dev

earnest phoenix
#

smh

#

you can just loop over every single role of the user and remove everything except that one role

#

better than removing all roles then adding back the one you want

#

you'll save yourself 2 API requests

sudden geyser
#

.set only uses 1 API request.

earnest phoenix
#

you didn't get it

#

let's say i have 10 roles
if he removes all roles then adds back one role he'll first send 10 API requests to remove roles and 1 more for adding back one

if he just removes everything except the one role then he'll only send 9 API requests

#

isn't that what they're doing already

#

set is setting the roles to whatever array was provided in the arg

#

you can modify all roles with a single api request

sudden geyser
#

Yet they're using victim.roles.set([communityRole])? That works by sending one single API request to set what roles the user has, making it 1 request. Unless I'm missing something.

earnest phoenix
#

smh

#

they didn't send the whole code

#

and explained poorly

pure lion
#

Does mongoose updateOne require you to save the document again?

sudden geyser
#

I don't see how it was explained poorly: "I want to be able to remove all roles from a member except for one" and proceeds to show their snippet on how they're accomplishing it.

misty sigil
#

bruh if I knew you were gonna ask here I would’ve asked here myself

slender thistle
#

afaik it should pass silently if there's no document that fits the filter

pure lion
#

Matt I'm on mobile

#

I can't go on the vps

#

And there's no intellisense

misty sigil
#

U can github doe

pure lion
#

But mobile

earnest phoenix
#

What program does Notum Erwinum use to see the cached stuff in discordum.jsum

#

what, the stats?

#

yesum

misty sigil
#

message.content.replace('um', '')

dark kestrel
#

How i can create new Error()

#

new Error() ?

#

but it is not wroking

earnest phoenix
#

can you send the code?

#

you might be just calling the constructor but not throwing the error

#

@earnest phoenix it's grafana

dark kestrel
earnest phoenix
#

@dark kestrel you're just creating an object

dark kestrel
#

uh

earnest phoenix
#

you need to throw the error object

#

throw throws whatever object you're passing

#

so throw new Error() will work

dark kestrel
#

ok

#

it works

earnest phoenix
#

why are you making errors?

dark kestrel
#

just testing the error logs function

earnest phoenix
#

oh ok

#

why are you making errors?
@earnest phoenix there is a purpose for everything

#

i was just asking

#

i was just explaining

#

ok

rich ore
#

ok

cinder sandal
#

ok

#

ok

rich ore
#

ok

#

what now

cinder sandal
rich ore
#

why thank you i was about to ask

gentle lynx
#

does anyone why the bot doesnt reply with "yrs" even when i mention a channel

#

or send

cinder sandal
#

why

sudden geyser
#

does it reply at all

gentle lynx
#

no

sudden geyser
#

is the first if condition failing (admin check)

cinder sandal
#

administrator perms for just mention a role???

gentle lynx
#

yes i have admin perms and i did mention a channel

shy turret
#

@gentle lynx did you actually add the message event

#

what is "message"

gentle lynx
#

?

shy turret
#

message.content == "setmschannel"

cinder sandal
#

why do you need admin perms for "Mention a channel"

shy turret
#

it would only response if you sent setmschannel

gentle lynx
#

OH

#

my god

shy turret
#

you need to add .startsWith()

gentle lynx
#

yeah

#

forgot sorry

shy turret
#

if (message.content == "setmschannel" || message.content.startsWith("setmschannel") {}

cinder sandal
#

what the command does

#

and why it needs admin perms

gentle lynx
#

it's fixed

autumn aspen
#
 msg.react('❌');

    const filter = (reaction, author) => {
        return ['❌'].includes(reaction.emoji.name) && author.id !== client.user.id;
    };

    msg.awaitReactions(filter, { max: 1, time: 30000, errors: ['time'] })
    .then(collected => {
    const reaction = collected.first();

    if (reaction.emoji.name === '❌') {
        msg.delete().catch(error => {
        })
    }
})
.catch(collected => {
    const autorReactions = msg.reactions.cache.filter(reaction => reaction.author.cache.has(client.user.id));
try {
for (const reaction of authorReactions.values()) {
    reaction.author.remove(client.user.id);
}
} catch (error) {
console.error('Failed to remove reactions.');
}
});
    // message.channel.send("❌ Sorry, this command is currently disabled. For more information please contact **Support Server**")
};

I want it to only delete the message who requested it not any user. someone help?

earnest phoenix
#

what the hell are you even trying to do pls explain

sudden geyser
#

Instead of checking if the author ID is equal to the client user, check if the original message author ID is equal to the user being filtered

autumn aspen
#

what the hell are you even trying to do pls explain
@earnest phoenix I want it to delete when author reacts not any user wich it does rn

drifting wedge
#

if im coding a website

#

how can i like look at it?>

#

using atom

#

and css

cinder patio
#

If it's just a static website, open your main html file

drifting wedge
#

it is

#

but the styling isnt working

cinder patio
#

if it's a server, like express for example, open your browser and go to localhost:portYouSet

#

Maybe you aren't importing it correctly

drifting wedge
#

how do i import correncly?

#

correctly*

cinder patio
#

how are you importing it currently?

drifting wedge
#

well idk lol

cinder patio
#

Your css won't magically work, use the link tag

thin turret
#

Homie wrote a css file and expected it to magically connect to html

drifting wedge
#

ah thanks

#

no it wasent tha

#

it was linked

#

i just named it style

#

not stylesd

#

styles*

#

im not too good with that stuff

#

i have someone workibng with me so dats why

next glade
#

Hey can annyone help me in python on repl.it ?

honest perch
#

i accidently replaced the wrong file

slender thistle
#

state your issue

honest perch
#

fuck

next glade
#

Hey can annyone help me in python on repl.it ?

slender thistle
#

just

#

say whatever that's wrong or you need help with

next glade
#

me ?

slender thistle
#

Yes

next glade
#

OK

#

i have developed an global chat bot in python

#

and i will host it on repl . it

#

but i need an keep_alive file and i must import flask for that

slender thistle
#

Can't you just ping the project every X minutes?

next glade
#

Traceback (most recent call last): File "main.py", line 8, in <module> from keep_alive import keep_alive ModuleNotFoundError: No module named 'keep_alive'

#

thats the error

#

Can't you just ping the project every X minutes?
@slender thistle no

slender thistle
#

uhh why do you need a keep_alive

next glade
#

look

#

`from flask import Flask
from threading import Thread
import random

app = Flask('')

@app.route('/')
def home():
return 'Online'

def run():
app.run(
host='0.0.0.0',
port=random.randint(2000,9000)
)

def keep_alive():
'''
Creates and starts new thread that runs the function run.
'''
t = Thread(target=run)
t.start()`

#

that is my code in keep_alive

#

and idk from what the error comes

slender thistle
#

huh

next glade
#

and where must i do the keep_alive modul pack up

#

that it funct ?

earnest phoenix
#

@next glade repl.it kills ur bot if it’s inactive after a certain period of time

next glade
#

no

earnest phoenix
#

Wrong ping

#

@slender thistle

#

lmfao

next glade
#

@next glade repl.it kills ur bot if it’s inactive after a certain period of time
@earnest phoenix imao my bot is not inactive

slender thistle
#

I know, manny

#

There's no keep_alive module though

#

@next glade Can you send the full traceback you get?

next glade
#

traceback ?

#

error ?

slender thistle
#

yeah

earnest phoenix
next glade
#

its only that form

Traceback (most recent call last): File "main.py", line 8, in <module> from keep_alive import keep_alive ModuleNotFoundError: No module named 'keep_alive'
here

jovial void
#

you're importing a module that doesn't exist apparently

next glade
#

must i do import keep_alive ?

slender thistle
#

no

next glade
#

ok

#

must i do it away ?

jovial void
#

i mean where are you trying to import keep_alive from

#

I don't see anything on PyPI

next glade
#

i mean where are you trying to import keep_alive from
@jovial void idk

jovial void
#

then you should get rid of it

#

idk what you're trying to do with keep_alive since its not anything you've made or on PyPI

next glade
#

look

#

i will have an web window for uptime robot

#

and how become i that ?

jovial void
#

I can't help you with that since idk how to do it, google is your best friend there. But you can't just import random things, they have to actually exist, so go look at some PyPI packages and see which ones you want to do

#

preferably ones that are async since dpy is an async library

raven urchin
#

I need some help with configuring this, I don't really understand how to do it. Any help on it?
https://ramblings.fred.moe/2020/3/tunnelbroker-with-lavalink

gentle lynx
#

in node.js how can i check if x/y returns a full number? (not double)

quartz kindle
#

Number.isInteger(x)

gentle lynx
#

thanks

errant perch
#
case "numberguess":
var embed = new Discord.MessageEmbed()
.setTitle("Number Guess Started")
.setDescription("Please pick a number 1-100")
.setFooter("Say 'end' to leave the game")
.setColor(color);
message.channel.send(embed);
var rnumber = Math.floor(Math.random() * 100) + 1;

bot.on("message", message => {
if (message.channel instanceof Discord.DMChannel) return;
if (message.author.bot) return;
                    
if(message.content > 100) return message.channel.send("Please choose a number below 100")
if ((message.content) == rnumber && message.author == message.author) {    message.channel.send(`Correct, the number was ${rnumber}`);
} else if ((message.content) > rnumber && message.author == message.author) {
message.channel.send(`Your number was too high, try again`);
} else if ((message.content) < rnumber && message.author == message.author) {
message.channel.send(`Your number was too low, try again`);
}})
break;``` whenever the person guesses the number right it keeps going
#

uh

#

this is dumb but help

gentle lynx
#

I-

errant perch
#

lol

gentle lynx
#

how can i finish this so it sends a msg to the channel

#

also shouldnt i be doing (`id`, channelID)?

errant perch
#

client.channels.cache.get(channelid).send(message)

gentle lynx
#

oh right lmao

errant perch
#

im using v12

#

that might work

#

as long as you are using v12 it should

gentle lynx
#

doesnt work

errant perch
#

whats the error

gentle lynx
#

ill check the dog

#

theres no error it doesnt show

#

docs*

errant perch
#

ok

gentle lynx
#

wait i use v12 as well

#

shouldnt that work :/

errant perch
#

ur missing the last half

#

nd(message)

#

lol

gentle lynx
errant perch
#

yes

#

client.channels.cache.get(channelid).send("p")

gentle lynx
#

ok ill try

#

works thanks

#

also sorry if now people dont see your messages LOL

errant perch
#

idc

#

i'll figure it out later

storm ermine
#

bot developer perm pls

opal plank
#

@gentle lynx reminder that cache.get() might not always return

#

if guild doesnt return you'd be doing undefined.channels which would throw error

#

use conditional or check for it

raven urchin
#

How can I configure the Lavalink to have more IPs? I already used tunnelbroker but I don't understand what to add to the code

honest perch
#

you dont

#
  server:
    # ...
    ratelimit:
      ipBlocks: ["1234:1234:1234::/48"]
      strategy: "LoadBalance"
      searchTriggersFail: true```
#

add that to the config file but with the correct block

raven urchin
#

I use a .env

honest perch
#

lavalink config

raven urchin
#

That's where like the Lavalink_host goes

honest perch
#

not your bots config

raven urchin
#

So make a lavalinkconfig?

honest perch
#

no

#

jesus christ

#

so you have a lavalink server

raven urchin
#

Yeah

honest perch
#

you should have a application.yml file

#
server: # REST and WS server
  port: 2333
  address: 0.0.0.0
lavalink:
  server:
    password: "youshallnotpass"
    sources:
      youtube: true
      bandcamp: true
      soundcloud: true
      twitch: true
      vimeo: true
      mixer: true
      http: true
      local: false
    bufferDurationMs: 400
    youtubePlaylistLoadLimit: 6 # Number of pages at 100 each
    youtubeSearchEnabled: true
    soundcloudSearchEnabled: true
    gc-warnings: true
    #ratelimit:
      #ipBlocks: ["1.0.0.0/8", "..."] # list of ip blocks
      #excludedIps: ["...", "..."] # ips which should be explicit excluded from usage by lavalink
      #strategy: "RotateOnBan" # RotateOnBan | LoadBalance | NanoSwitch | RotatingNanoSwitch
      #searchTriggersFail: true # Whether a search 429 should trigger marking the ip as failing
      #retryLimit: -1 # -1 = use default lavaplayer value | 0 = infinity | >0 = retry will happen this numbers times

metrics:
  prometheus:
    enabled: false
    endpoint: /metrics

sentry:
  dsn: ""
#  tags:
#    some_key: some_value
#    another_key: another_value

logging:
  file:
    max-history: 30
    max-size: 1GB
  path: ./logs/

  level:
    root: INFO
    lavalink: INFO
#

which looks a bit like this

torpid tiger
#

Possible EventEmitter memory leak detected. 11 message listeners added. Use emitter.setMaxListeners() to increase limit Hmm, how can ı set the limit of events?

honest perch
#

uncomment this and fill it in

#

@torpid tiger you have too many listeners

torpid tiger
#

I know

honest perch
#

you only need one for your commands

gentle lynx
#

nvm

#

or

#

how

#

like i cant do .addRole

torpid tiger
#

.roles.add(`Role ID`)

gentle lynx
#

yes!

#

can i do it with name?

torpid tiger
#

Yeah

gentle lynx
#

thanks

#

shoudl i do

torpid tiger
#

let role = message.guild.roles.cache.find(rol => rol.name === `Name`);

#

Then

gentle lynx
#

oh

#

ok thanks

#

this will get the ID?

torpid tiger
#

.roles.add(role)

feral aspen
#

Hello

#

Question

#

I want to make my bot delete messages that has bot invites.

#

Am I supposed to make an event or what?

raven urchin
#

For the server part and password, it's on the .env I don't have an application.yml

gentle lynx
still merlin
#

You use a normal message event and delete anything starting with https://discord.com/api/oauth2/authorize?client_id= or something like that @feral aspen

gentle lynx
feral aspen
#

I'm using a command handler, do I create a command and what I do then?

#

@still merlin ?

gentle lynx
#

if guild doesnt return you'd be doing undefined.channels which would throw error
@opal plank what about in this case?

still merlin
#

Create a normal file and do stuff ok, I'm not gonna spoonfeed you

feral aspen
#

Like Im trying to make a settings command to disable link blocker and enable

#

Create a normal file and do stuff ok, I'm not gonna spoonfeed you
@still merlin Rude, didn't ask for spoonfeeding, just asked in summary

still merlin
#

You need a database for that

feral aspen
#

You need a database for that
@still merlin Alright? I know..

#

so message event, alright then.

still merlin
#

Just do your normal command files, Check if the guild has disable bot invites true/on or whatever your using and delete anything starting with the bot invite things (https://discord.com/api/oauth2/authorize?client_id=)

feral aspen
#

Alright.

#

👍

earnest phoenix
#

hey

#

where can i get a nsfw api

knotty quartz
#

Hi can I get help?

earnest phoenix
#

im here also for that

#

but i see there not

knotty quartz
#

There a error getting my bot online using discord.js

earnest phoenix
#

but i can try to help u

knotty quartz
#

friends*

earnest phoenix
#

send the error

open rune
#

THATS login

#

u

earnest phoenix
#

firstt

knotty quartz
#

It says "error token not reconzied"

earnest phoenix
#

u dont have a login

open rune
#

don't show us that Token

slender thistle
#

you leaked your token, regenerate it as soon as you can

earnest phoenix
#

2nd

#

to use case

#

u need to specify args or case

knotty quartz
#

I use a different langauge for my bot with me having a databse I had to change the whole scripts for blacklisgt

earnest phoenix
#

ok u needmore help

#

my brain is at level 2

#

so im not a pro yet

open rune
#

because, it seems has some different things

earnest phoenix
#

can i get help with an nsfw api

#

i want to add more things to my bot

#

so im ading nsfw

open rune
#

I can't help you for that NSFW. but, for api, please ask it here #topgg-api

knotty quartz
#

.js

thick gull
#

no

#

@open rune wrong

#

that’s for topgg api

open rune
#

oh right

#

@knotty quartz show me the code, and the error

#

don't leak your token again.

earnest phoenix
#

then where it the api

thick gull
#

find one

earnest phoenix
#

i cant

#

thats why im here

#

ok maybe searching in google helps

open rune
#

yes, googling

earnest phoenix
#

i was searching on npm

#

frick

#

Error 503 Backend fetch failed
Backend fetch failed

Guru Meditation:
XID: 15410069

Varnish cache server

gentle lynx
#

what's the guild member join event called

knotty quartz
#

@knotty quartz show me the code, and the error
@open rune I just change my token well discord did can you go to DM's please?

earnest phoenix
#

i found this

gentle lynx
#

guildMemberAdd?

thick gull
#

@slender thistle is that allowed pepowot

earnest phoenix
#

lieke if u put on browser doesnt work

#

so how does the bot do

#

@slender thistle is that allowed pepowot
@thick gull ucant acces

slender thistle
#

This isn't the server for NSFW API suggestions

earnest phoenix
#

then help me

#

give me a good api

slender thistle
#

Read the rules first

earnest phoenix
#

i did

slender thistle
#

What does rule 12 say

earnest phoenix
#

Must not reward users for voting for a different bot

slender thistle
#

server rules, all the way up

earnest phoenix
#

there are so many rule 12's

#

ok

#

No NSFW content within the server

#

but that wasnt nsfw

#

since u cant acces with a browser

#

it will just spam u a line of code

slender thistle
#

Screenshots of NSFW content don't redirect users to NSFW websites. Does that make it more compliant with the rules?

earnest phoenix
#

dude

#

it wasnt nsfw

#

sice there was nothing there

#

since*

#

just go to logs and click the link

#

it will just apear acces: something

#

i forgot

#

but u got it

slender thistle
#

You're literally linking a resource that's intended to be used to receive NSFW content

earnest phoenix
#

no

#

bc it doesnt work

slender thistle
#

okay let me set the auth header and I might get what, a pic of a random cat that's totally child-friendly?

earnest phoenix
#

whats a auth header

#

oh thats why only bots can acces that

#

oh sorry then im the wrong one

#

lol

#

i admit

#

im wrongº

#

browsers can access apis too

#

you just need to set the header

#

it didnt for me

slender thistle
#

You can access it yourself if you have a client that can send HTTP requests with custom headers

earnest phoenix
#

brain.exe stoped working

#

you either inject headers with js or use an addon to modify the headers (on browsers)

slender thistle
#

You can literally inject headers with vanilla JS?

earnest phoenix
#

brain.exe is geting 999999% confuzed

#

yeah by redirecting

#

welp

#

then

slender thistle
#

ah yeah I guess

earnest phoenix
#

can u help me with api

#

i just want my bot to be special

#

it isn't and it won't be

#

or have a lot of functions

#

your bot will never be special, that's a fact all bot devs have to deal with

#

it isn't and it won't be
@earnest phoenix stop being pessimist

#

the market is oversaturated with huge bots that already do what your bot does, but better

#

your bot will never be special, that's a fact all bot devs have to deal with
@earnest phoenix what if you code your own api

old latch
#

your bot will never be special, that's a fact all bot devs have to deal with
@earnest phoenix why can't bots be special?

earnest phoenix
#

bc he doesnt know how to make apis

feral aspen
#

Anything wrong??

        inviteblock[guild.id] = {
            name: bot.guild.cache.get(guild.id),
            value: false
        }
        fs.writeFile("../../settings/inviteblock.json", JSON.stringify(inviteblock), (err) => {
            if(err) console.log(err);
        });
    }```
earnest phoenix
#

so for him

feral aspen
#

Doesn't seem to writeFile

earnest phoenix
#

everything is equal

#

i've been a senior full stack dev for 3 years

#

apply water to the burned area

#

i know more than you do

#

lol

gentle lynx
earnest phoenix
#

yes

#

wait

gentle lynx
#

what parameters does this event take

#

is it only member?

earnest phoenix
#

when a member joins

old latch
#

being optimistic isn't bad so why are u so pessimist @earnest phoenix

earnest phoenix
#

he will do something

#

@gentle lynx see the docs

gentle lynx
#

i did

earnest phoenix
#

dude

old latch
#

u have to dream big to actually make something big

earnest phoenix
#

when a member joins he does something
@gentle lynx

#

@old latch i'm not, i'm stating facts. if you ask anyone with more than 2 brain cells here about bots, they'll tell you that the market is oversaturated

raven urchin
gentle lynx
slender thistle
#

@gentle lynx It's only member. To access the guild the member joins, see member.guild

gentle lynx
#

ah ok

#

thanks

earnest phoenix
#

np

raven urchin
#

I don't know what to do if half of the stuff is inside the .env

earnest phoenix
#

what

old latch
#

I have more than 2 brain cells and yes there are many many bots but there still are ideas that haven't been coded by anyone

earnest phoenix
#

what a .enc

#

.env

raven urchin
#

.env

earnest phoenix
#

trust me, there are

raven urchin
#

It's a secret folder that nobody can access

earnest phoenix
#

welp

#

pacman? exists
tetris? exists
n64 emulator? exists

old latch
#

not everything.

earnest phoenix
#

i know what .ulf and .alf files are

#

no bot is original anymore

#

do you @earnest phoenix

#

every single bot is a shallow copy of one another lol

old latch
#

you can't know because it doesnt exist now

earnest phoenix
#

i need kick ban command pls

#

except it does

#

i need kick ban command pls
@earnest phoenix just do member.kick

#

or member.ban

slender thistle
#

@earnest phoenix Rule 8, we don't spoonfeed code here

earnest phoenix
#

and u good to go

#

you will get there

#

ok sory

#

sorry

#

@earnest phoenix Rule 8, we don't spoonfeed code here
@slender thistle yes but you can give a litle had like i did

#

hand*

#

this was a huge problem back in 2017 when i was still doing public bot deving and it's even a bigger issue right now

do you really think your bot is original among hundreds of millions of others lol?

#

dude

#

this dude has no braincells

#

what if u code your own api

slender thistle
#

Keep it civil

earnest phoenix
#

its not special

#

if u did

#

"code your own api"

#

it is

#

do you understand what that means

old latch
#

@earnest phoenix maybe we should drop the topic, I just wanted to say that there are ideas that haven't been created, and if you come here and tell the people that every bot is a copy from another you don't help anyone making those special bots

earnest phoenix
#

do you understand what that means
@earnest phoenix yes what you dont do

#

an API is an umbrella term

#

wow noshris sherlock

#

you don't know what an umbrella term is

#

i know

slender thistle
#

Keep this discussion civil or drop it as a whole.

earnest phoenix
#

you don't understand half of what i'm saying so you're being aggressive lol

#

Keep this discussion civil or drop it as a whole.
@slender thistle okay then

#

an API doesn't make your bot special

faint prism
#

It makes the project more complex though

earnest phoenix
#

i can have an API that exposes how many coins each user's got in my bot's database

raven urchin
#

So how can I transfer some stuff to the application.yml? Cuz idk if lavalink_host, lavalink_port and lavalink_password should be in there

earnest phoenix
#

it doesn't make my bot special

old latch
#

are there many story bots on discord?

#

I mean

#

bots that are a story game

earnest phoenix
faint prism
#

Looks like a good amount

earnest phoenix
#

you shot yourself in the foot lol

#

this proves my point that no idea is original

#

every idea you come up with is/has existed

faint prism
#

no idea is original
Maybe so. But the implementation of an idea can often be novel

earnest phoenix
#

are you implying these guys are capable of that

old latch
#

well, depends from what you say the idea is. if you say that no idea is original because all bots are discord bots, true, then all are copies. but do you know how many different stories there can be? how many ways of implementing them into a discord bot? you can make something unique just with this simple idea, I'm sure

faint prism
#

Yeah

I meant it more fundamentally though.
For example, an Idea like Time Travel or something
Implementation of that would be completely unique and new. But the idea has existed long before.

#

For a story bot, the stories and flow would be novel (hopefully)

old latch
#

Yeah

I meant it more fundamentally though.
For example, an Idea like Time Travel or something
Implementation of that would be completely unique and new. But the idea has existed long before.
@faint prism I agree

#

and if you get that one super cool way of bringing your idea alive with a discord bot, your bot can be special

#

and that's all I have to say

#

have a nice day y'all :)

opal plank
#

@gentle lynx same thing

#

check if your .get() is returned before you run the rest of the command

thick gull
#

everything’s been done; it’s how can I improve X, not how can I copy X,

quartz kindle
#

there are sill unique things out there

#

but they are quite niche and not for everyone

#

for example bots for specific platforms

#

or for a specific subject

gentle lynx
#

@opal plank lol nvm i fixed it already but thanks

thick gull
#

yeah, but most likely the ideas been done tbh

#

often you can improve it

#

that’s what i find /shrug

quartz kindle
#

you have to dig deeper xD

thick gull
#

fair thank you goodbye

opaque seal
#

I've read a lot of things about Discord Channel Positions.
I was basically trying to order channels, but some times Discord would put the channels in an absolute random spot.
It seems like if there isn't consistency when setting a position of a channel?

Can someone confirm me that this is an API issue and not an issue of the library I'm using (discord.js)

Is there a way to order channels even with this strange Discord behaviour?

slender thistle
#

Discord channel ordering was a clusterfuck for me. It was very inconsistent with a few channels on my private server between multiple devices

opaque seal
#

Did you manage to order them

#

I mean, I can, but sometimes it just fucks up

boreal iron
#

But yeah u‘re able to edit its position

earnest phoenix
#

it's an API issue

opaque seal
#

You guys ever investigated that?

earnest phoenix
#

i couldn't ever figure out how it works

boreal iron
#

Just always set the position when creating a channel.

#

If so this might not happen

slender thistle
#

i couldn't ever figure out how it works
me neither

opaque seal
#

Just always set the position when creating a channel.
@boreal iron I give the positikn to the channel when I create it + I manually set it again after creating it. This fixes most of the problem but there still are cases where it doesn't work correctly

boreal iron
#

Hmm ok never experienced such an issue

#

It’s probably a feature, not a bug

opaque seal
#

Lol

#

Don't think so honestly ^^

boreal iron
#

🤔

gilded ice
#

How do I send a channel to dm?

kind thicket
#

<#ChannelID> I suppose

gilded ice
#

Ah ok

earnest phoenix
#

send a channel to dm
what

gilded ice
#

I wane to make channel in dm

kind thicket
#

of course you have to replace channelID with the actually channel ID

gilded ice
#

Oh

earnest phoenix
#

The bot doesn't send any reply, why tho?

const Discord = require('discord.js');
const client = new Discord.Client();
const token = "<token>";

client.on("ready", () => {
    console.log('${client.user.tag} jest gotowy');
    client.user.setActivity("na siłowni na strychu"); 
});

client.on('message', async message => {
    if(message.author.client) return;
    if(message.channel.type === "dm") return;

    let randomMessages = [ `bo tak`, `ja tam nie wiem`, `spytaj się boga ojca wszechmogącego`, `w internetach poszukaj`, `a co ja jakaś encyklopedia jestem?`, `bo ja tak powiedziałem i tak ma być`, 'nie chcesz wiedzieć...', 'no bo wiesz no... :sunglasses::call_me:'];
    if(message.content.includes("sikorze" && "czemu")) {
    message.channel.send(randomMessages[Math.floor(Math.random() * (randomMessages.length - 1))])
    }
});

client.login(token);
sudden geyser
#

&& can't be applied to a string like that as the first one always returns truthfully.

#

If you want to see if it starts with X or Y, you should do the expression twice: if (includes("one") || includes("two")) {...}

#

Also message.author.client points to the client user just so it's easy to access.

#

If you want to block bots, use message.author.bot to see if the user's a bot instead.

eternal osprey
#

Hey guys I have one fast question.

earnest phoenix
#

what is it

eternal osprey
#

Can a bots prefix be set to &

sudden geyser
#

yes

earnest phoenix
#

i think so

eternal osprey
#

okay, thanks!

#

I had some problems in the past where I couldn’t use alphabetical characters.

earnest phoenix
#

ohh

#

could i do somthing like this instead?

if(message.content.includes("sikorze") {
    if(message.content.includes("czemu") {
        //rest of the stuff
    }
}
gilded ice
#

A bots prefix can be anything, you're just checking if a string has a string

sudden geyser
#

Yes, but that's just another form of writing: if (message.content.includes("sikorze") && message.content.includes("czemu"))

earnest phoenix
#

so it wouldn't work either?

sudden geyser
#

It would work.

shy turret
#

I worked on this for a while and I finally made my scripting language be able to make commands without arguments.
I made the scripting language like Skript:

on message:
 if "%args%" is "test":
  send "hi"

hehe

sudden geyser
#

But there are two issues in your code I spotted

#

The second one being if (message.author.client) return;

slender thistle
#

Do you use Python's is

earnest phoenix
#

yeah, already fixed this

slender thistle
#

or is it your equivalent of Python's ==

gilded ice
#

Wait

#

Py has an is keyword?

slender thistle
#

Yes

gilded ice
#

Why

slender thistle
#

The is keyword is used to test if two variables refer to the same object.

sudden geyser
#

Yes, it's just a shortcut for: if id(obj1) == id(obj2)

earnest phoenix
#

well, what if i want my bot to respond to these message even if they are uppercase?

slender thistle
#

rely on lowered message content

sudden geyser
#

make the content lowercase

gilded ice
#

Make it lowercase

silver lintel
#

what is the text stuff called like `${stuff}blahblah`?

earnest phoenix
#

string interpolation

shy turret
#

I was playing with my scripting language's code and I made it so you can actually have arguments now.

on message:
 if "%args 1%" is "!test":
  send "%args%"
#

i have no idea how i made the limits actually work (im gonna make this scripting lang in a public bot) but it works so ill take it it doesnt work...

drifting wedge
#

Can I use py with html? And mongo?

solemn latch
#

what do you mean can you use py with html?

drifting wedge
#

Like no já

#

Js

#

Only py

slender thistle
#

You can't use Python in frontend

#

Only backend

drifting wedge
#

Front end would be js?

#

Backend is mongo stuff

slender thistle
#

Yes

drifting wedge
#

Right?

slender thistle
#

Yes

earnest phoenix
#

You can't use Python in frontend
theoretically you can with WASM

#

and i have to manually do the > because for some reason i got the inline replies update but i can't send inline replies lol

slender thistle
#

lmao

sudden geyser
#

Let's switch places you give me inlines

drifting wedge
#

Let's switch places you give me inlines
@sudden geyser test

#

Shit

split hazel
#

anyone know a good, stylish and colourful logger for nodejs

sudden geyser
#

Why not just use chalk for the color thing

split hazel
#

chalk i see

solemn latch
#

Chalk is great, but do you really wanna write all your logs on the driveway?

#

what if it rains?

#

joking btw ;p

sudden geyser
#

Get some Chalk+

#

comes with rain protection and redrawing

slender thistle
#

Bro Chalk++, better for the environment and easier to use

raven urchin
#

I'm getting this error after I added application.yml

Error: Request failed with status code 503```
earnest phoenix
#

503 = service unavailable

#

.yml files dont throw http errors

ancient nova
raven urchin
#

Yeah Ik, but after I add it and try to play a song it'll throw an error

#

But when I delete it, it'll work fine

sharp thicket
#

:BC_AmongUsPepe:
@ancient nova #memes-and-media or general cuz mods will prob warn

sharp thicket
#

@earnest phoenix bruh stop just sending random stuff

#

Or ill call a mod :p

earnest phoenix
#

okeh This was the first time

sharp thicket
#

Ok please talk about bot stuff

#

Cuz it annoying

earnest phoenix
#

Ah, ok ok, lemme re phrase... databases make me want to neck, i don't understand them one single bit.

solemn latch
#

what dont you understand

sharp thicket
#

Yeah

earnest phoenix
#

40333 / 60 = 672.2166666666667
how do i make it happen? 40333 / 60 = 672.22

sharp thicket
#

What

#

English please

sudden geyser
#

use .toFixed

sharp thicket
#

Ok someone got a comand idea?

solemn latch
#

game commands are fun

sudden geyser
#

What is your bot about

sharp thicket
#

general purpose

earnest phoenix
#

@solemn latch every fucking part of them, Honestly been sat here for a whole day trying to figure out how to 1) get it to work, and 2) how to put it into the command

sudden geyser
#

hmm then I can't give a good one

sharp thicket
#

Oof

#

@earnest phoenix what db

slender thistle
#

Something tells me it's SQLite?

earnest phoenix
#

😂

#

well

sharp thicket
#

Lol

sudden geyser
#

If you're having a hard time with databases you can use an ORM to make your life easier.

sharp thicket
#

@slender thistle Run “avioshivaco” in testing please

sudden geyser
#

But learning how to use them rather than reading for the alternative is a better choice.

sharp thicket
#

:p

earnest phoenix
#

i did look at Mongo @slender thistle but then decided to just go about doing it in i think the worst way possible because now i'm more confused than when i first started -_- i'm like a kitten with a yarn ball...

slender thistle
#

eh

solemn latch
#

dont know mongo at all tbh

slender thistle
#

mongo is fairly easy to set up

solemn latch
#

they have a whole amazing set of guides on their website iirc

#

even video tutorials if that helps

earnest phoenix
#

no clue on it,

earnest phoenix
violet mesa
#
@client.event
async def on_message(message, ctx):
    amountofmessagesper5seconds(message.author.id) += 1 
    start = time.time()
    time.clock
    elaped = 0
    while elaped < 5:
        elaped = time.time() - start
        amountofmessagesper5seconds(message.author.id) = 0
        
    if amountofmessagesper5seconds(message.author.id)  == 5:
        await ctx.message.delete()
        await ctx.message.delete()
        await ctx.message.delete()
        await ctx.message.delete()
```why does thing not work (discord.py)
solemn latch
#

whats not working

earnest phoenix
#

Error^

solemn latch
#

or, if no error, whats supposed to happen, and whats not happening

violet mesa
#

1 sec

#

this is the error

#

does it think amountofmessageper5seconds(message.author.id) is a function and if it does how do i fix

sudden geyser
#

well is it a function

violet mesa
#

no

#

its suppose to be a var

sudden geyser
#

Then why are you calling it like one

solemn latch
#

thing(otherthings)
is typically a function layout afaik

violet mesa
#

cause i want it to be for the same user and not for all users

sudden geyser
#

Okay, can you show us what it's defined as

violet mesa
sudden geyser
#

also on_message doesn't have a second parameter, so the ctx parameter does not make sense

violet mesa
#

it starts like that

#

how do i del messages then?

sudden geyser
#

message

#

some of your code just doesn't make sense, like the declaration of that variable

violet mesa
#

message.delete()?

#

some of your code just doesn't make sense, like the declaration of that variable
@sudden geyser im stoopid please let me know of any mistakes

solemn latch
#

most people consider bots not a first project type of thing

celest schooner
earnest phoenix
#

mongoose op

celest schooner
#

im trying it compared to my normal enmap

sudden geyser
#

@violet mesa,

  1. You can't declare a variable like a function call. You define them as my_variable = my_value, so amountofmessagesper5seconds(message.author.id) = 0 makes no sense.
  2. When you use the += operator, you're usually assigning a new value to a variable, method or something that implements one of the magic methods.
  3. What is time.clock sitting around there for?

If you're new to Python, i recommend you take the time to learn it, as there are several errors in your code that only take a few seconds/minutes to debug.

celest schooner
#

enmap is basically persistent collections

sudden geyser
#

.../?

#

Did you mean ../../

celest schooner
#

oh that i didnt know that

earnest phoenix
#

How would I set the @everyone permissions?

message.guild.channels.create(`${message.author.username}-vs-${found_user.username}`, {
        reason: `a match has started between ${found_user.tag} and ${message.author.tag}.`,
        type: "text",
        parent: client.channels.cache.get(config.matches_category),
        permissionOverwrites: [
            {
                id: message.author.id,
                allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'EMBED_LINKS', 'ATTACH_FILES']
            },
            {
                id: found_user.id,
                allow: ['VIEW_CHANNEL', 'SEND_MESSAGES', 'READ_MESSAGE_HISTORY', 'EMBED_LINKS', 'ATTACH_FILES']
            }
        ]})

I'm trying to set channel permissions for @everyone but I can't seem to figure out how to do it

#

I tried finding the role with .find but when adding it to the permissionOverwrites array it said that it has to be a role ID

solemn latch
#

the role id is the guild id

earnest phoenix
#

ah

#

right

#

okay thanks

silver lintel
#

hwo to see if a user unreacts in msg collector djs?

solemn latch
#

in any message in the collector?

earnest phoenix
#

Why is my bot offline

solemn latch
#

we are not the devs for your bot

#

we wouldnt know why its offline

earnest phoenix
#

Who is then

solemn latch
#

you

#

?

silver lintel
#
 if (reaction.emoji.id === "758896673023590471") {
          console.log(object);
          return;
        } else if(reaction.emoji.name === '1️⃣') {
          object[1] = true;
        } else if(reaction.emoji.name === '2️⃣') {
          object[2] = true;
        } else if(reaction.emoji.name === '3️⃣') {
          object[3] = true;
        } else if(reaction.emoji.name === '4️⃣') {
          object[4] = true;
        } else if(reaction.emoji.name === '5️⃣') {
          object[5] = true;
        } else if(reaction.emoji.name === '6️⃣') {
          object[6] = true;
        } else if(reaction.emoji.name === '7️⃣') {
          object[7] = true;
        } else if(reaction.emoji.name === '8️⃣') {
          object[8] = true;
        } else {
          
        }
#

ive got this

#

if the user unreacts how to make it so the object becomes false

solemn latch
#

im confused, you said message collector?

earnest phoenix
silver lintel
#

oops

#

sorry i mean reaction collector

earnest phoenix
#

Look at pic

solemn latch
#

read what luca said?

earnest phoenix
#

How long will it take

solemn latch
#

pretty sure its 5+ weeks rn

earnest phoenix
#

Nooooooooòooo

solemn latch
silver lintel
#

o thanks

earnest phoenix
#
var member = message.mentions.users.first() || bot.users.cache.get(args[0]);
let joinedON = member.joinedTimestamp

joinedON is returning the current date, but i joined the server wayyy before today

solemn latch
#

well, your getting .users not .members

#

users are not members

earnest phoenix
#

OHHH

#

ty

solemn latch
#

not sure why it would give you anything at all though tbh

#
#

user doesnt have .joinedTimestamp

earnest phoenix
#

hm

#

when i use mentions it returns the current date/time

#

but when i use id with what you told me it says cache isn't defined GWumuThink

solemn latch
#

yeah, Client.members doesnt exist since it doesnt know what members to get from what guild.

#

youd want to use guild

earnest phoenix
#

yeah

#

well it works now

#

thx

drifting wedge
#

so im making a dashboard

#

with python as backend

#

how do i connect it to mongo?

solemn latch
drifting wedge
#

ty

#

and also u know the like link thingys in the dev dashboard?

solemn latch
#

nope

drifting wedge
#

oath2

solemn latch
#

oauth should be looked into on the discord site

drifting wedge
#

wut does that do/mean?

solemn latch
#

its pretty complex stuff imo

drifting wedge
#

ok

solemn latch
#

theres not really any discord specific tutorials afaik, just general oauth2 tutorials

drifting wedge
#

and for scopes, i can use them for like seeing if my bot is on the user's servers

#

and like a list so they can join them?

solemn latch
#

yeah, you can do that with oauth2

earnest phoenix
sudden geyser
#

Everything in JS is an object

#

At least I assume that's the reason it says any.

#

One solution would be to use @typedef to document how the object's keys and values should be passed, which will be a better experience when reading documentation.

earnest phoenix
#

Oh k, thanks

ionic dawn
#
JDABuilder JD = new JDABuilder();
Package pkg = JD.getClass().getPackage();
String version = pkg.getSpecificationVersion();

Shouldn't this give me the package version? HmmChamp

sudden geyser
#

It should, have you tried it?

earnest phoenix
#
{
"response":{
"game_count":4,
"games":[
{
"appid":400040,
"playtime_forever":0,
"playtime_windows_forever":0,
"playtime_mac_forever":0,
"playtime_linux_forever":0
},
{
"appid":252490,
"playtime_forever":0,
"playtime_windows_forever":0,
"playtime_mac_forever":0,
"playtime_linux_forever":0
},
{
"appid":700580,
"playtime_forever":0,
"playtime_windows_forever":0,
"playtime_mac_forever":0,
"playtime_linux_forever":0
},
{
"appid":730,
"playtime_forever":0,
"playtime_windows_forever":0,
"playtime_mac_forever":0,
"playtime_linux_forever":0
}
]
}
}

I'm pulling data from the json above. I passed it to a for loop, but I get an error.

const derece1 = [];
for (var i = 0; i < oyunlar.response.games.length; i++) {
const xxx = `https://store.steampowered.com/api/appdetails/?appids=${oyunlar.response.games[i].appid}&l=turkish&cc=TR`;
let haha = await fetch(xxx).then(url => url.json())                derece1.push(`${haha[oyunlar.response.games[i].appid].data.name}`)
}
embed.addField('Oyunlar', derece1.length ? derece1.join('\n') : "Yok.",false)

my goal is to get a name based on the appid number.

TypeError: Cannot read property 'name' of undefined
ionic dawn
#

It should, have you tried it?
@sudden geyser returns null

earnest phoenix
marble geode
#

hi guys how to fix code 500 on glitch??

sonic lodge
#

5xx errors are server related

native folio
#

what would be the best os to create a bot in?

sonic lodge
#

you should probably just wait

#

@native folio there is no "best" os, it comes down to your preferences and needs

native folio
#

ok, thanks

quartz kindle
#

@earnest phoenix you have an invalid app id

earnest phoenix
#

everything seems right

green vale
#

Hiya!!-Question: Do welcome messages need server member intents?

quartz kindle
earnest phoenix
#

oh my bad.

#

I forgot there are games and tools on steam

#

ex: sharex

quartz kindle
#

@green vale without the members intent you will not receive guildMemberAdd events

#

however its still possible to make welcome messages by listening to the built-in system welcome message in the message event

green vale
#

Fair, fair. I'd just like to make sure, as I'm applying for whitelists and I'd like to keep it straight-forward. Thank you!

earnest phoenix
#

My codes are not working

#

Help me

#

It's the link join and see my errors

sage bobcat
#

One message removed from a suspended account.

oak cliff
#

@earnest phoenix you can ask for help with your code but you cannot ask someone to just join your page and fix it for you
you can share snippets here by copy and pasting and putting things in codeblocks (with three ` on either side)
be aware as per #rules-and-info we do not spoonfeed here, which means that we do not give you code, we are here to gently guide you in the right direction

earnest phoenix
#

You also might want to regenerate your token now.
@earnest phoenix might unless they're too dumb to follow simple instructions

earnest phoenix
#

@oak cliff read that again I have just asked to see the errors not to fix it that's all

oak cliff
#

then copy paste your errors here

#

nobody wants to join your glitch project to help you

earnest phoenix
#

@oak cliff ok

#

@oak cliff const Discord = require("discord.js");
const { prefix, token } = require("./package.json");
const client = new Discord.Client();

client.once("ready", () => {
console.log("Ready!");
});

client.on("message", message => {
if (message.content === ${prefix}goodmorning) {
message.channel.send("Good morning @everyone Stay Happy!.");
} else if (message.content === ${prefix}goodnight) {
message.channel.send("Good night @everyone Stay Safe.");
} else if (message.content === ${prefix}server) {
message.channel.send(
Server name: ${message.guild.name}\nTotal members: ${message.guild.memberCount}
);
} else if (message.content === ${prefix}user-info) {
message.channel.send(
Your username: ${message.author.username}\nYour ID: ${message.author.id}
);
}
});

oak cliff
#

I'm not going to help you

earnest phoenix
#

@oak cliff ok

oak cliff
#

but someone else might, so please stop pinging me

earnest phoenix
#

You said to do so

#

That's why

#

😑

oak cliff
#

I didnt say to ping me

earnest phoenix
#

is it pointless to use D3.js for a game

open rune
#

can anyone teach me how to use Electron?

restive furnace
#

Formatting Guide:

```<short name of the language>
code
```

-> For JS:
```js
console.log('Hello world!');
```

->

console.log('Hello world!');

Basically it works with any 2/3 charaters long language names which exists. there are few exceptions: for example you need to use csharp instead of c# for C# code formatting.

cinder patio
#

Isn't it cs for c#?

earnest phoenix
#

what the hell is happening with my reactions

#

Isn't it cs for c#?
@cinder patio it's an alias

flint yew
modest crane
#

nice but where's json database Thonk

compact oriole
#

exactly LUL

#

and where is the common prefix

earnest phoenix
#

WHY DOES GOOGLE KEEP MAKING ERRORS ON LOGINS

pale vessel
#

@flint yew shame on you, i use npp

#

maybe that's why i'm a shit dev think3d

flint yew
#

hehehe

earnest phoenix
#

document.getElementsByTag is not a function smh

pale vessel
#

TagName

prime glacier
#

i used npm i haileybot/captcha-generator
but still getting error
Cannot find module 'haileybot/captcha-generator'

pale vessel
#

try @haileybot/captcha-generator

earnest phoenix
#

is it installed in the node_modules of the CURRENT directory?

prime glacier
#

done

#

try @haileybot/captcha-generator
@pale vessel already tried

pale vessel
#

look in your node_modules folder and see if it's even there

prime glacier
#

ok

#

there is no folder with name haileybot!

#

in node_modules

clever lynx
#

HI

pale vessel
#

try installing it again and make sure you're in the directory node_modules is in

prime glacier
#

ok

pale vessel
#

npm i @haileybot/captcha-generator

#

don't forget the @

prime glacier
#

ok

#

@pale vessel Cannot find module 'C:\Users\gamin\OneDrive\Desktop\captcha bot\node_modules\@haileybot\captcha-generator\dist\index.js'. Please verify that the package.json has a valid "main" entry

earnest phoenix
#

setInterval ain't working on browser javascript

#

ah nevermind explicit variable stuff inside the callback which gets executed with no arguments

#
target.addEventListener(type, listener [, options]);
target.addEventListener(type, listener [, useCapture]);
target.addEventListener(type, listener [, useCapture, wantsUntrusted  ]);

what the hell is wrong with the commas MDN we need to discuss smth

#

how do i make uptime command so i can see how long the bot has been online?

#

@earnest phoenix there is a way to check the uptime of the client in discord.js

#

client.uptime

#

it returns a Date

#

not a String

#

keep that in mind

#

okay

#

@earnest phoenix actually it's a number

#

sounds weird for a date

#

because it's the number of milliseconds the bot has been up not like hours days or smth

pale vessel
#

it's inside [] since it's optional, what's wrong with it?

earnest phoenix
#

it looks weird

#

seems like listener is an array with the first element being an options object

feral aspen
#

const HamoodiHajjiri = ?

How can I get make it like the variable of my name is like my ID?

#

so I can use the ID for something else.