#development

1 messages · Page 624 of 1

idle basalt
#

oh ive seen this. you want to make a chat thing?

fiery stream
#

I have it

#

I need webhook thats the final component that i need to make a fully immersive bot

idle basalt
#

oh so you got dialogflow to work you just want it to chat through a webhook?

fiery stream
#

Ill show u

#

@idle basalt any idea

idle basalt
#

i dont understand your problem

#

so, no

fiery stream
#

I neet webhook

#

Need

idle basalt
#

that doesnt mean anything

#

though im pretty sure this isnt what you need

fiery stream
#

Thats what i need

idle basalt
#

ah

fiery stream
#

Yee

idle basalt
#

oh i see

#

they send a POST request to your server for further instructions

fiery stream
#

Ik

#

I tried it several times but i failed

idle basalt
#

well does your server have a url it can be reached at? youd have to set that up

alternatively, you can (probably) get dialogflow to send a request to whichever api you want and just take their data straight away

fiery stream
idle basalt
#

oh boy hosting with glitch

grim aspen
#

i hate that idea

fiery stream
#

For testing?

#

Ill change source later

#

If it works

grim aspen
#

use a vps

#

better

fiery stream
#

Ik ill

#

I cant manage to make it work

earnest phoenix
#
blackList.push(message.mentions[0].id);

TypeError: Cannot read property 'id' of undefined```
mossy vine
#

again, can be solved by 10 seconds of reading the docs https://discord.js.org/#/docs/main/stable/class/MessageMentions

earnest phoenix
#

ok

#

its gives me the same error

#

i put :

message.user.id
#

and its handed me the same thing

mossy vine
#

again, can be solved by 10 seconds of reading the docs. message doesnt have a user property

earnest phoenix
#

Stopped to take me out the doc, I am French, I have no translation and I get lost nothing is explained

mossy vine
#

you know the word "property", thats enough to figure out what properties an object has. depending on your code editor, code completion is available as well

earnest phoenix
#

so I put user.id ?

mossy vine
#

i dont even know what you want to do

earnest phoenix
#
const Discord = require ("discord.js");
const fs = require ("fs");

module.exports.run = async (bot, message, args) => {
	fs.readFile("./blacklist.json", (err, data) => {
	var blackList = JSON.parse(data);
	let useradd = args.join(' ');
	if(!useradd) return message.channel.send("**❌ Veuillez insérer un utilisateur**");
	var newBlackList = JSON.stringify(blackList);
	
	blackList.push(message.user.id);
	fs.writeFile("./blacklist.json", newBlackList, (writeErr) => {
		if (!writeErr) {
		message.channel.send("**✅ L'utilisateur à bien été ajouté à la blacklist.**")
		} else if (blackList.indexOf(message.mentions[0].id) > -1) {
			message.channel.send("**❌ L'utilisateur est déjà blacklisté.**")
		} 
	})
	})
} 

module.exports.help = {
	name:"addbl"
} 
			
mossy vine
#

using json as database and reading it every time a command is called, nice so do you want to blacklist the person who wrote the message, or ther user it mentions?

earnest phoenix
#

user it mentions

#

noo, no this

mossy vine
#

message.mentions.members.first()

earnest phoenix
#

the person who is added to the blacklist

#

sry,

#

the person who is added to the bl

mossy vine
#

so do you want to blacklist the person who wrote the message, or the user it mentions?

earnest phoenix
#

I want to be the person mentioned

mossy vine
#

message.mentions.members.first() or message.mentions.users.first()

earnest phoenix
#

ok

#

Thx

lime fiber
#

Help me! My oauth code worked well all day, but suddenly I'm getting this.

#

What can i do?

#

I think it can't get the access_token

sage bobcat
#

One message removed from a suspended account.

lime fiber
#

I'm using oauth. I logged in using that discord stuff. It worked all day.

quartz kindle
#

well, whats on those lines in your welcome.php?

lime fiber
quartz kindle
#

you cant user headers if you already echoed anything

#

headers have to be before any type of content

lime fiber
#

But it worked when we made the guilds "listbox" 😄

quartz kindle
#

well, errors happen, and you need to think of all possibilities

#

headers always go before content

lime fiber
#

ok, I'll give a try

quartz kindle
#

the other errors mean you're trying to get a property of a non object, same as "cant get x of undefined" in js

lime fiber
#

I know that. It'll define these here (pics). And thats why I think that it can't get the access_token

earnest phoenix
#

is typescript good

#

i think its an easier syntaxed version of js

trail dagger
#

I want to make a discord bot, and i cant come up with a good theme.. some suggestions?

opaque eagle
#

I like TypeScript personally

#

Catching errors before runtime is so great

spring ember
#

It makes you confident with what you write

opaque eagle
#

Yeahh

spring ember
#

Both Dart and TypeScript are amazing as JS replacements

lime fiber
#

If I move the header it will create a redirect loop

earnest phoenix
#

So TS is better ?

quartz kindle
#

is not "better", its different

#

has pros and cons

lime fiber
#

It says $token is non-object

#

So it can't get the token maybe 🤔

quartz kindle
#

error_log($token)

#

should appear in a text file called error_log.txt in the same directory

earnest phoenix
#

whats cons

#

for djs

young cradle
#

TypeScript is JavaScript in the end. It is just a superlanguage with typings.

earnest phoenix
#

ikr

quartz kindle
#

the cons is that you have to run it through a compiler before using it

young cradle
#

Personally, TypeScript is good for your own sanity and more stable code. If you do not care about stability, should not worry that much about moving.

earnest phoenix
#

ill need to change everything to ts

#

nah keep it

young cradle
#

Not really everything, it took me about two days to move a bot from pure JS to TS.

#

Just really depends on how long is your code.

#

Specially, how much 🍝 there is.

#

Mine is at the point of no return, too much 🍝.

earnest phoenix
#

i got 16 cmds

young cradle
#

Though, if you really want to try it out. Do it when you plan to refactor. Else it will most likely be a loss of time.

earnest phoenix
#

ill code from beginning if i do so

lime fiber
#

It doesn't create any error_log file 😦

young cradle
#

I see... Well, take a look at it in the official website. TypeScript is very vast and well supported, so you should not have any issues dealing with it.

mossy vine
#

typescript only matters in the development process. what the end user sees doesnt depend on what language you used

young cradle
#

It is also nice to shorten code, some things can be longer in TS but others can massively shorten because of it.

mossy vine
#

the only reason to use it is to keep your code maintainable, especially if you deal with many data types, in which case strong typing will be very useful

lime fiber
young cradle
#

Well, we are talking about that here. As said previously, TypeScript is just JavaScript in the end.

mossy vine
#

it does compile to javascript anyways

quartz kindle
#

@lime fiber then remove the redirect and var_dump($token)

mossy vine
#

idk php at all, but then maybe session('access_token') returns false?

#

also, why do you need 3 foreach? cant you just do

foreach($guilds as $guild) {
    $teszt2 = $guild->name;
    $teszt3 = $guild->id;
    $teszt4 = $guild->owner;
}```
quartz kindle
#

^

lime fiber
#

👀

mossy vine
#

$token isnt an object then?

quartz kindle
#

did it dump anything tho?

lime fiber
#

I think nope

quartz kindle
#

just disable everything else in the page

#

coment out everything

#

and leave only the token reuqest

#

and dump it

lime fiber
#

ok

#

I made it. What should i see?

#

I think the NULL is it.

earnest phoenix
#

Do anyone know some bot who can give auto role to bots

Like when i add bot he will get automatic role

Same like for new user and them get role automatic. I need for bots

silent folio
#

How do i make so bot talks in one channel

#

And the command is usable only in it

#

?

mossy vine
#

set up permissions for the bots role

silent folio
#

Oh ok

#

Ok ty

coarse patrol
#

Ayo.

#

Anybody know a free node.js learning website?

mossy vine
earnest phoenix
#

Help me pls

#

I need bot who can give role to new bots

#

Like to users

#

Do anyone kbow one

mossy vine
#

if its the automatic role th-

earnest phoenix
#

Know*

#

But to all bots is make to new users

mossy vine
#

youre a bot dev, it takes like 10 lines of code max

earnest phoenix
#

I need to new bots

#

I use different program

mossy vine
#

oh what a normie

indigo geyser
#

How can I do (discord.py) a bot write in a specific channel?

I use await message.channel.send('message here')

#

Plz help me

mossy vine
#

that seems like discord.js code, didnt know its that simialrsimialr to d.py Thonk

indigo geyser
#

Idk

mossy vine
#

simral

#

asimral

lime fiber
#
await message.channel.send(discord.Object(id='channel id here'), 'message here')
indigo geyser
#

Tnks!

lime fiber
#

I edited!

indigo geyser
#

Ok tnks

#

I have to use it for eliminated messages logs

slender thistle
#

why the ID being string

#

Also

#

What.

#

message.channel.send(destination, content)???????

indigo geyser
#

Ok

slender thistle
#

@mossy vine 0.16.12 d.py:

await client.say(channel, text, ...)

1.0.0+:

await Messageable.send(text, ...)
mossy vine
#

oh

earnest phoenix
indigo geyser
#

@slender thistle I use Client no bot

#

@earnest phoenix good

slender thistle
#

What does that tell me

#

Are you getting any errors

#

That's a no then

lime fiber
#

When I dump $token I get NULL

indigo geyser
quartz kindle
#

@lime fiber then something is wrong with the request, what are you using for it? have you checked the discord docs as well? somewhere must be written the cases when it returns null

coarse patrol
#

Anybody know a website where I can learn node.js for free? Excluding stackoverflow.com

indigo geyser
#

Nope @coarse patrol

coarse patrol
#

I know codecademy

quartz kindle
#

do you need something specific that requires node.js? else just learn javascript

coarse patrol
#

But it required PRO to learn node.js

quartz kindle
#

node.js runs javascript

indigo geyser
#

Me too, but idk if there is node

slender thistle
#

@indigo geyser

  1. content.startswith
  2. Your indendation is not proper
coarse patrol
#

I'm trying to make a bot. Does this require node.js only or can I also use js?

quartz kindle
#

it requires node.js

indigo geyser
#

@slender thistle pherphase it's because I'm using Pydroid

quartz kindle
#

but node.js is not a language

#

node.js is a program that runs javascript code

indigo geyser
#

It's a node

quartz kindle
#

if you know javascript, you already know 90% of node

slender thistle
#

... what does that have to do with the solutions I provided for your error?

indigo geyser
#

2

#

Isn't proper

#

(excuse me for my bad English)

slender thistle
#

You are adding more spaces where you don't need one or the opposite of that

indigo geyser
#

Mmmh.... Ok

#

Oooffff

#

Now I saw

#

Nope

slender thistle
#

Should I start with an essay on how you ignored my first advice

#

Or do I complain about you not showing any more parts of your code

hushed quarry
#

@indigo geyser that is not how message.channel.send works. Please refer to the discord.py documentation.

slender thistle
#

They initially did it right but someone decided to give a shitty code

#

so now we're stuck here

indigo geyser
#

Ok, now I understand

hushed quarry
#

then they shouldn't just paste code without knowing how it works

indigo geyser
#

This code is wrong

hushed quarry
#

indeed

slender thistle
#

I smell 2 errors

slender thistle
#

That first one you fixed, the second one I have no clue if you fixed it

#

But your .send is wrong on that screenshot anyway

formal agate
#

I have been losing my mind over this for so long I cannot think of what to do anymore. I do not know why the function play is not being run while the console.log console.log("Checkpoint more in queue"); is running. I must be missing something very obvious here right? ```js
let fetched = ops.active.get(dispatcher.guildID);
console.log("Defined fetch");

//if (!fetched) return console.log("Error at fetch");

fetched.queue.songs.shift();
//delete fetched.queue.songs[0];
console.log("Shifted queue");

ops.active.set(dispatcher.guildID, fetched);
console.log("Set queue");

if (!fetched.queue.songs[0]) {
console.log("Checkpoint nothing left");

    let vc = fetched.queue.voiceChannel;  
    if (vc) vc.leave();
    
    fetched.queue.textChannel.send(`🎶 || Finished playback`);
    
    ops.active.delete(dispatcher.guildID);

} else {
console.log("Checkpoint more in queue");
play(client, setting, ops, fetched);
}

indigo geyser
#

@slender thistle ok

indigo geyser
slender thistle
#

Do you understand what I meant by Messageable

#

You ever read the d.py docs?

indigo geyser
#

Yes but I didn't understand it⭐

slender thistle
#

Messageable is a class that you can use .send on

#

Text, group channel and users are subclasses of Messageable, hence, you can do member.send if member is instance of Member class

#

In your case you don't literally do Messageable.send

indigo geyser
#

Oh

slender thistle
#

That should be good enough

#

I am tempted to suggest commands extension

indigo geyser
#

You can do it!

#

Pls

slender thistle
#

I'd rather suggest learning Python in this case

#

and starting to read the docs

indigo geyser
#

I noob

#

Ok ok

#

I'm going to read this

slender thistle
#

👌

indigo geyser
jolly sentinel
#

It doesn't give you much info but it works ig

unique nimbus
#

yeet

indigo geyser
slender thistle
#

Self-explanatory errors!

jolly sentinel
#

Are you in async or rewrite

slender thistle
#

They're on latest

jolly sentinel
#

I thought the only thing on_error took was the error

slender thistle
#

And by latest, I mean 1.0.0+

jolly sentinel
#

That's rewrite

#

Async is .1.6

slender thistle
#

rewrite is no more at this point

indigo geyser
slender thistle
#

Something is a string but it should be something else

jolly sentinel
#

a string isn't a channel

slender thistle
#

A string does not have an attribute 'channel'

indigo geyser
#

Ooofff

jolly sentinel
#

difference between;
"272764566411149314"
and
client.get_channel("272764566411149314")

indigo geyser
#

So what I have to do?

jolly sentinel
#

though rewrite uses int for channel IDs

#

uhh

slender thistle
#

They are

jolly sentinel
#

My error event is completely different

indigo geyser
#

Yes

jolly sentinel
#
// put all the stuff here

@client.event
async def on_command_error(ctx, error):
    // code here```
replace `channel.message.send()` with `ctx.send()` (channel.message.send() is async)
indigo geyser
#

Idk if Pydroid can do it

#

Ok

jolly sentinel
#

It should work if it's rewrite

#

though using isinstance and importing the errors could be better
(ex. importing CommandNotFound and checking if isinstance(error, CommandNotFound))

slender thistle
#

on_command_error

#

They're not using the cmds ext

jolly sentinel
#

If they're trying to send a message to a channel, I'm sure they're attempting to find an error on a command that was executed in that channel

#

Oh

#

wait

#

I just reread what you said

slender thistle
#

It's just an if in an on_message

#

Until you start using the commands extension, I would just suggest using try-except

indigo geyser
#

Now it tell me the right error, but on Discord it don't tell anything

jolly sentinel
#

Isn't the commands extension just apart import discord for discord.py?

#

nvm

#

I can't read my own code

indigo geyser
#

Why?

jolly sentinel
#

I literally said that, turned to my imports and saw from discord.ext import commands and I felt dumb

slender thistle
#

Basic Python time

#

Wrap your "commands" in try-except and you should be good for now

#

(I'm not disregarding the fact that your code will look ugly)

indigo geyser
#

I don't understand

#

Wait

#

Google Translator, I choose you

jolly sentinel
#

I think he is using the async branch

slender thistle
#

Since when does async have Messageable.send stuff

jolly sentinel
#

rewrite uses ctx to send messages

indigo geyser
#

What is try-except?

pine light
#

oops

jolly sentinel
#

and if you want to send a message to a specific channel, you use a client.get_channel() variable

#

chan = client.get_channel(id) then await chan.send()

slender thistle
#

try:
do_something
except:
do something else

#

Honestly

jolly sentinel
#

this man be asking how to do try-except

indigo geyser
#

Because in Italian it doesn't have sense

slender thistle
#

In Python it makes sense

#

And if you spent some time actually learning the language first, you would've recognized that centuries ago

jolly sentinel
#

calling shots

#

🍿

slender thistle
#

At this point I'm teaching Python instead of helping with a Discord bot

jolly sentinel
#

fun

earnest phoenix
#

i couldnt download python

#

my console didnt get pip or python3

slender thistle
#

Tried python?

earnest phoenix
#

i installed p3 pip and choco

jolly sentinel
earnest phoenix
#

yep

slender thistle
#

I honestly cba to answer these questions at 2 am anymore at this point

jolly sentinel
#

I'm pretty sure I had to use github's cmd thing

slender thistle
#

That was back in the days

#

pip was still used

#

You would just download directly from the GitHub repo

jolly sentinel
#

I just kind of downloaded discord.py and discord.py[voice] which i never got working and was kind of done with it

earnest phoenix
#

pyt succ- im done trying to use python

jolly sentinel
#

what

slender thistle
#

Your call

earnest phoenix
#

ill go with js

#

but p3 is better as i see

slender thistle
#

shrug

#

To each their own

jolly sentinel
#

i would play around with javascript but honestly it feels like learning how to do the same thing but with a different way of saying it

#

almost like learning a different language-- ohhhh wait

earnest phoenix
#

ikr

jolly sentinel
#

that's exactly what it is

#

all I really care about learning is Python & Java tbh

#

I'll probably need to learn more down the line but procrastination is fun

earnest phoenix
#

So I want to be able to have the bot delete every message in a channel and then send a embedded message with what the message the bot deleted as the description anyone able to help.

slender thistle
#

on message, delete the message, get another channel, post message content in that channel

jolly sentinel
#

wait what

#

so you want to purge a channel

#

and have the bot send a message with what

earnest phoenix
#

No.

#

So basically for exsample

#

I send a message here “Test”

jolly sentinel
#

delete every message in a channel

#

this sounds like a purge to me

earnest phoenix
#

The bot would delete it

jolly sentinel
#

ah

#

so in a channel

earnest phoenix
#

Then send it as a embed in this channel

#

With “test” as the description

jolly sentinel
#

what language is this

earnest phoenix
#

Discord.js

slender thistle
#

Apparently I got ignored

jolly sentinel
#

i just didn't understand what he was asking

earnest phoenix
#

So how would I do that

jolly sentinel
#

what he said

slender thistle
#

Fairly basic to understand without an example

jolly sentinel
#

I've no clue how to do this on discord.js but I'm sure they have a function that fires every time a message is sent

earnest phoenix
#

I’m not good with discord.js

jolly sentinel
#

i was right the first time

#

read the docs

opaque eagle
#

message event?

dusky marsh
#

^

#

<Client>.on('message', (msg) => //handle message)

shy turret
#
function findmove(movenum, move) {
  if (movenum = "0") {
    if (move = 1) {
      var move1name = "None"
    } if (move = 2) {
      var move2name = "None"
    } if (move = 3) {
      var move3name = "None"
    } if (move = 4) {
      var move4name = "None"
    }
  } else {
    if (fs.existsSync('data\\moveid\\' + movenum + '.txt')) {
      if (move = 1) {
        var move1name = fs.readFileSync('data\\moveid\\' + movenum + '-name.txt').toString().split('\n');
      } if (move = 2) {
        var move2name = fs.readFileSync('data\\moveid\\' + movenum + '-name.txt').toString().split('\n');
      } if (move = 3) {
        var move3name = fs.readFileSync('data\\moveid\\' + movenum + '-name.txt').toString().split('\n');
      } if (move = 4) {
        var move4name = fs.readFileSync('data\\moveid\\' + movenum + '-name.txt').toString().split('\n');
      }
    } else {
      if (move = 1) {
        var move1name = "None"
      } if (move = 2) {
        var move2name = "None"
      } if (move = 3) {
        var move3name = "None"
      } if (move = 4) {
        var move4name = "None"
      }
    }
  }
});
#

Error

C:\Users\[]\Desktop\[]\bot.js:164
});
 ^
buoyant wagon
#

} only?

shy turret
#

?

worn ridge
#

It should be pretty obvious

shy turret
#

I'm pretty blind

#

I don't see it

#
const fs = require('fs') 
const Discord = require('discord.js')
const client = new Discord.Client()

I have these const on

worn ridge
#

You neither open the ( nor need you a ; after a function definition

shy turret
#

...

quartz kindle
#

look at both corners of your code

#

function () {})

shy turret
#

...???????

quartz kindle
#

...

#

what is it that you dont understand?

shy turret
#

(i am stupid? yes)

#

let me try tis

worn ridge
#

You never open the ) bracket in the last line. So there is no need to close it

shy turret
#

oh

#

wow

#

that worked too fast

#

thx...

worn ridge
#

Just use a proper ide with a linter

shy turret
#

I use Notepad

#

xD

idle basalt
#

well uh, dont

jolly sentinel
#

what's the way to ask for a discord channel in discord.py rewrite arguments (like how you can do user: discord.Member)

#

p

#

o

#

discord.TextChannel

near ether
#

How do you guys manage your databases?

#

Like what approach do you guys take

harsh fossil
#

DynamoDB

#

It is the cheapest option for me atm

earnest phoenix
#

I just use local files

near ether
#

Yea I just have a json file for each user/guild but I feel like that’s kinda dumb tbh

harsh fossil
#

I think MongoDB has a free hosted tier as well

earnest phoenix
#

i mean it works and its free

#

i got a .txt file for all users of my bot, it just stores them all in the same file

sinful lotus
#

leveldb for small bots is fine and it has key value type storage

#

although for sharding level db dont support that,
sqlite does support sharding and if your bot doesnt write that much then sqlite is a fine option

near ether
#

Gotcha

#

Ty

sinful lotus
#

leveldb is the easiest and fastest but no sharding support
learn sql and you can use sqlite and it can support sharding

#

both are local based database so they are not hard to setup

near ether
#

I see

#

Would my current usage of JSONs be a valid approach or is it way better just to use a database?

sinful lotus
#

Jsons was never been a valid approach

#

I dont know even why a lot of new comers use json

near ether
#

Easy to use tbh

sinful lotus
#

level db is easier to use

fallow steppe
#

anyone here uses python?

sinful lotus
#

JSONs are more complicated to use in my opinion

near ether
#

Damn

#

Alright I’ll give it a shot right now

#

Thanks man

shy rose
#

@harsh fossil is Dynamo nosql?

sinful lotus
#

leveldb implements the same idea of a map, so you can probably use JSON.stringify() on it

#

then JSON.parse and use the guildID as a key

#

its as easy as that

harsh fossil
#

Nosql or key value pair

sinful lotus
#

that is the same

shy rose
#

Isn't mongo one of the better ones for json

#

That's what nosql is lol

harsh fossil
#

DynamoDB specifically says both in it's docs so idk
I just follow the crowd

sinful lotus
#

just use what you think is good

#

if you can use sql statements then you can try sql databases

#

if you hate sql then try nosql

#

in the end its your choice

fallow steppe
#

Anyone who uses python3, what is the raw data that changes the bot's prefix? ( ping when replying )

unique nimbus
#

command_prefix

#

@fallow steppe

#

If you want it so its custom for every server you need a database

#

however idk how to use it

fallow steppe
#

I was looking for a data that changes the prefix by running a command

#

Such as c!prefix !c

jolly sentinel
#

so only for you to use?

earnest phoenix
#

How would I make a bot do a action when they send a message in a channel.

bright spear
#

what

unique nimbus
#

I think they want a command to send a message in a separate channel

#

Like using command here to send a message to #commands

jolly sentinel
#

no

#

I think it's when someone does x, bot does y

#

@earnest phoenix elaborate

#

also what language

earnest phoenix
#

@jolly sentinelI know that I dont knwo what that is tho

#

A exsample would ne jelpfil.

jolly sentinel
#

'jelpfil'

#

what language are you coding in

#

Python, JavaScript, etc.

idle basalt
#

"english"

jolly sentinel
#

stop right there, criminal scum

hidden ginkgo
#

Although a very low proportion of people creating bots seem to know much about anything in regards to programming, it's good to see so many people trying their hand at it.

zealous veldt
#

Agreed

shy rose
#

it would also be good to see some proper demo's that cover a more full understanding of what they are doing

rather than copy paste based yt tutorials

zealous veldt
#

yeah

shy rose
#

as it seems a large amount lose that initial spark after completing the tutorial then slamming into a wall at the end as they dont really know what they just did beyond copy

hidden ginkgo
#

Perhaps the very same content creators who provide those resources should do more to promote additional learning.

shy rose
#

true guess its the balance between in depth and keeping the attention span of the user to learn the "boring" bits

hidden ginkgo
#

Although it's technically out of scope for this discord server, perhaps there should be a dedicated section which links to learning resources that aren't just youtube tutorials.

zealous veldt
#

I do want to compile a list like that

vapid pier
#

how can you make your bot reply with a webhook message

topaz sphinx
#

webhook message

#

like

#

what you mean by that

#

sun is rising i need to get to bed in a moment LULW

#

@vapid pier

vapid pier
#

like if you wanna make a help command

#

instead of a normal message

#

its a webhook with all the cmds

earnest phoenix
#

ooohh think he means embed?

#

maybe

vapid pier
#

ye

topaz sphinx
#

webhook is basically making a subscribable feed of information

vapid pier
#

oh

topaz sphinx
#

embed is however

#

making those nice boxes that looks fancy that only bots can make

vapid pier
#

yeah

topaz sphinx
#

are you using .py lib or .js

vapid pier
#

js

trim swallow
#

py is pretty fun

topaz sphinx
#

yeah thats my main but i can search quickly for js

#

so basically

shy rose
#

The embed visualiser i dont have the link to rn
Has the ability to export the embed to your choose lib

topaz sphinx
#

i linked it correctly

#

so u should get straight to right place @vapid pier

#

even got an example

shy rose
#

What about the visaliser one @topaz sphinx do you have that on you

topaz sphinx
#

nah i dont use the visualiser

#

havent seen that one actually

#

but its like in html

#

css, sorry

shy rose
#

Let's you export code
And view embed in browser

topaz sphinx
#

oh

#

this is handy

#

thanks Chewey

junior summit
#

i am getting this

#
  <rejected> TypeError: Cannot read property 'send' of undefined
      at Object.exports.run (C:\Users\chillkey123123123213\Desktop\Chill Beta\discord-bot\commands\remind.js:76:20)
      at Client.<anonymous> (C:\Users\chillkey123123123213\Desktop\Chill Beta\discord-bot\bot.js:83:7)
      at Client.emit (events.js:189:13)
      at MessageCreateHandler.handle (C:\Users\chillkey123123123213\Desktop\Chill Beta\discord-bot\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
      at WebSocketPacketManager.handle (C:\Users\chillkey123123123213\Desktop\Chill Beta\discord-bot\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:103:65)
      at WebSocketConnection.onPacket (C:\Users\chillkey123123123213\Desktop\Chill Beta\discord-bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
      at WebSocketConnection.onMessage (C:\Users\chillkey123123123213\Desktop\Chill Beta\discord-bot\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
      at WebSocket.onMessage (C:\Users\chillkey123123123213\Desktop\Chill Beta\discord-bot\node_modules\ws\lib\event-target.js:120:16)
      at WebSocket.emit (events.js:189:13)
```
vital nest
#

we need to know the function

#

but to me that looks like you are defining a variable from a request and it didnt get a result

earnest phoenix
#

How can i collect all guilds from a user (auth2) ?

shy rose
#

@topaz sphinx so you found it?

topaz sphinx
#

YES INDEED

#

sorry caps

vital nest
#

ive been getting an issue where mine wont tell me how many servers my bot is in when using bot.guilds.size it just says cant read size of undefined

#

do I need to do anything before I try to get that value?

jolly sentinel
#

Not good with js

#

But doesn't bot.guilds return a list?

#

I'm gonna assume .size does the same as length then

#

Also it should be able to run so akkoshrug

junior summit
#

isnt it just bot.guilds.size or client.guilds.size?

earnest phoenix
#

depends on how client (or bot) is defined.

vital nest
#
   token: auth.token,
   autorun: true
});``` this is how it is defined, but it still doesnt work
#

to sho how many servers it is on with bot.guilds.size

hushed quarry
#

please watch this video and readjust the given information you provided us

vital nest
#

I gave the information I have, when i do var bot = new Discord.Client({ token: auth.token, autorun: true }); bot.guilds.size it returns cannot read value of undefined (some of the info is from my post above

hushed quarry
#

you need to run the last part in an event. due to the async nature of it, that line (bot.guilds.size) will run before the bot is ready, and before all the servers are loaded

vital nest
#

I had that in the on bot.load event so once it all loaded

hushed quarry
#

can you paste the new code

vital nest
#
   token: auth.token,
   autorun: true
});
bot.on('ready', function (evt) {
    logger.info('Connected');
    logger.info('Logged in as: ');
    logger.info(bot.username + ' - (' + bot.id + ')');
    bot.setPresence({
        game: {
            name: 'Stat Collection Simulator'
        },
        status: 'online'
    });
    console.log(bot.guilds.size)
});
hushed quarry
#

what library are you using

vital nest
hushed quarry
#

bot.servers

#

discord.io looks super outdated btw, you might want to consider changing to a newer library (eris, discord.js, etc.)

#

it was last updated over a year ago (may 2, 2018)

vital nest
#

ok, thanks! ill give it a shot

#

if not ill change to a new library

lime fiber
#

So I'm here now. 😄 But what returns null now? And why it returned a value yesterday till 3PM?

late hill
#

yes

modest remnant
#

Help me

lime fiber
#

what is the problem?

modest remnant
#

My bot is not online

lime fiber
#

Did you put your token inside bot.run("TOKEN HERE") ?

#

what it says

modest remnant
#

it say wrong do

lime fiber
#

please take a screenshot of the output

slender thistle
#

Just saying "I am getting an error" does not help

pallid zinc
#

I can add status which tell how many people have that role

solemn sluice
#

Really stupid question but how do you turn on the bot?

quartz kindle
#

you code it

solemn sluice
#

I've done that

#

How do you turn it on?

quartz kindle
#

you run the program you just coded

solemn sluice
#

Ok

#

Thanks

lime fiber
#

🤔 Now I'm just getting this. NULL is the token, but I don't know what to do with.

quartz kindle
#

what are you using for the request?

lime fiber
quartz kindle
#

var_dump($response)

lime fiber
#

ok

quartz kindle
#

json_decode is returning NULL, that means its either an invalid json, or it has special characters

lime fiber
#

Returned nothing?!

quartz kindle
#

why do you have 2 curl_exec? which of them did you dump?

lime fiber
#

ohh

#

I didn't see that 😄

#

I removed the first and still nothing

#

The token is still returning NULL

quartz kindle
#

so the curl is not returning anything at all?

lime fiber
#

nope

quartz kindle
#

then something is wrong with your request

lime fiber
#

Yeah i guess

#

I'll take a look at it

quartz kindle
#

try this

#
if(curl_exec($ch) === false)
{
    echo 'Curl error: ' . curl_error($ch);
}
else
{
    echo 'Operation completed without any errors';
}```
lime fiber
#

ok

#

That is weird

#

But var_dump($response); returns nothing

#

Because header is sent here

quartz kindle
#

then the only alternative is that the url is wrong and returns a blank page

#

if i were you i would comment out everything, the entire code, except the curl

#

and tweak it until it gets the response it should

lime fiber
#

I var_dump everything 😄

quartz kindle
#

rip

#

maybe because you had more than one curl_exec

#

you were duplicating your requests

#

might have triggered the ddos protection

lime fiber
#

I'll try my other application

#

This is based 😦

#

Lets use VPN 😉

#

Rate limited my host server

#

oof

#

I think that was the error

#

thanks

coarse patrol
#

const Discord = require('discord.js')
const client = new Discord.Client()

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

client.on('message', message => {
//console.log(message.content)'

if (message.content.startsWith(` ${prefix}ping`)) {
     message.channel.send("Pong.");

}
client.login('no peeking at my token')

#

I need help.

#

I can't get it running for that reason.

#

It says that the client.on('message', message => { is the problem.

lime fiber
#

I don't know js but i guess you need to put a ; after client.login('token')

knotty steeple
#

ur missing })

#

before you login

coarse patrol
#

Let me test that.

#

I will update on you, if it works.

#

Wait.

#

@knotty steeple Where do i put it?

knotty steeple
#

before you login

coarse patrol
#

const Discord = require('discord.js')
const client = new Discord.Client()

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

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

if (message.content.startsWith(`${prefix}ping`)) {
     message.channel.send("Pong.");

}})
client.login('no peeking at my token')

#

this is what the code looks like now

#

It is working

#

But this happened

fading wigeon
#

bruh

#

the compiler tells you what the problem

#

is

earnest phoenix
#

Anyone know how to make a bot do something when someone sends a message in a spisific channel

#

For example

fading wigeon
#

just read the error log

coarse patrol
#

Maybe it's my first time coding.

fading wigeon
#

still

earnest phoenix
#

I say anything in this channel.

fading wigeon
#

read the error log

earnest phoenix
#

And then it bans me

#

How would I do that?

fading wigeon
#

hint: prefix var is not fdefined

earnest phoenix
#

But the ban doesn’t have to be ban

fading wigeon
#

@earnest phoenix rest action

#

parse all messages

earnest phoenix
#

?

#

Exsample

fading wigeon
#

check if message has been sent in channel

#

(do name or id check)

#

then do whatever

earnest phoenix
#

Can you show me a exsample

fading wigeon
#

onMessage(Event e){
if(e.getMessage().getChannel().getId() == "ChannelID") {
// do magic
}
}

#

@earnest phoenix

earnest phoenix
#

Thanks

velvet cliff
#

hey does anyone know what is wrong in this
const Discord = require('discord.js');

exports.run = async (client, message, args, tools) => {

if (!message.member.role.find(r => r.name === 'roleName')) return message.channel.send('This requires the role: roleName');

if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send('This role requires permission: ADMINISTRATOR');

if (!args[0]) return message.channel.send('Proper Usage: <prefix>poll question');

const embed = new Discord.Message.Embed()
.setColour(red)
.setFooter('React to vote.')
.setDescription(args.join(''))
.setTitle(`Poll Created By ${message.author.username}`);

let msg = await message.channel.send(embed);
await msg.react('✅');
await msg.react('❌');

message.delete({timeout: 1000});

}

fading wigeon
#

@velvet cliff got an error log?

velvet cliff
#

it says this

SyntaxError: Unexpected token const
1:10 PM
at createScript (vm.js:80:10)
1:10 PM
at Object.runInThisContext (vm.js:139:10)
1:10 PM
at Module._compile (module.js:617:28)
1:10 PM
at Object.Module._extensions..js (module.js:664:10)
1:10 PM
at Module.load (module.js:566:32)
1:10 PM
at tryModuleLoad (module.js:506:12)
1:10 PM
at Function.Module._load (module.js:498:3)
1:10 PM
at Function.Module.runMain (module.js:694:10)
1:10 PM
at startup (bootstrap_node.js:204:16)
1:10 PM
at bootstrap_node.js:625:3

fading wigeon
#

hmm

#

check your token

#

thats all i can say

#

not a js developer lol

opaque eagle
#

Show code

#

It’s a syntax error

velvet cliff
#

code is above but ill send it again

#

hey does anyone know what is wrong in this
const Discord = require('discord.js');

exports.run = async (client, message, args, tools) => {

if (!message.member.role.find(r => r.name === 'roleName')) return message.channel.send('This requires the role: roleName');

if (!message.member.hasPermission('ADMINISTRATOR')) return message.channel.send('This role requires permission: ADMINISTRATOR');

if (!args[0]) return message.channel.send('Proper Usage: <prefix>poll question');

const embed = new Discord.Message.Embed()
.setColour(red)
.setFooter('React to vote.')
.setDescription(args.join(''))
.setTitle(Poll Created By ${message.author.username});

let msg = await message.channel.send(embed);
await msg.react('');
await msg.react('');

message.delete({timeout: 1000});

}

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

opaque eagle
#

Lol

velvet cliff
#

so… do you see the problem?

opaque eagle
#

R u sure that’s the right file?

#

Lint your code and see where the error comes from

velvet cliff
#

well im a starter, so.. what does lint your code mean"?

#

but is there something wrong in the script?

late hill
#

Is Discord.Message.Embed() a thing

#

Guess not

velvet cliff
#

?

late hill
#

use Discord.RichEmbed() instead

#

May not exactly be your issue but it should be one of your issues at least

quartz kindle
#

also please use code blocks

velvet cliff
#

code blocks?

amber fractal
#
Like this
#

Use three backticks at the beginning and end of the message

velvet cliff
#

ok but there is nothing wrong in my script?

earnest phoenix
#

could someone pols help me with a error in my bot?

#

so basically, i have some stuff set up but its saying to me thast "args is not defined"

#

send ur code

#

without token

#

LOL

#

oh shoot

#

i think i might have actually fixed it

#

wtf

#

🥚

#

ok well i guess i had another question

#

so lemaa, you would be more familiar with this since it is your kick and ban command

#

is there a way for if someone dms the bot ".ban" or ".kick" it wont crash?

slender thistle
#

What is your programming language

earnest phoenix
#

node js

#

discord js

#

js

#

@earnest phoenix if(message.channel.type === "dm") return;

#

oh okj

slender thistle
#

Or !message.guild

earnest phoenix
#

should i put that at the very beginning of the kick and ban command?

#

@earnest phoenix no

#

Just one time

#

oh

#

In the index

#

not in a command

#

where should i put it

#

which part

#

at the very top?

#

or bottom

#

under client.on(message

#

can you put it in for me

#

im apperantly braindead

#

no

#

but i do not see where it is

#

like which client on message?

#

the one before the kick command?

#

i did it before and it still crashed

#

Line 26 @earnest phoenix

#

Put it on line 26

#

its not

#

working

#

@slender thistle i did your way but

#

now it comes up with this error instead

#

content with "s"

slender thistle
#

How did checking if a message is in a guild come to THAT

earnest phoenix
#

@earnest phoenix if(!msg.guild || msg.channel.type !== 'text') return;

slender thistle
#

Spoonfeed

earnest phoenix
#

@earnest phoenix try ^

#

like this right

#

Remove "s"

#

And its not on every command

#

No

slender thistle
#

In all God blessed fuckery

earnest phoenix
#

@earnest phoenix put on line 26

#

or try handler

slender thistle
#

Also it's message, not msg

earnest phoenix
#

is better

#

@slender thistle he has put client.on(msg

slender thistle
#

I can't open pastebin. Do they have multiple client.on(message) or what

#

If not, I don't see msg in that screenshot

earnest phoenix
#

yeah

slender thistle
#

Oh God

earnest phoenix
#

really

slender thistle
#

Under the event

#

Not above

earnest phoenix
#

@earnest phoenix under client.on(message and replace msg by message

#

and dont put it on every command

#

just one times

#

but this is what it was before

#

Yeah and remplace msg by message

#

so no ""?

#

what?

#

client.on(msg

#

no

#

what the actual

slender thistle
#

Learn the programming language before getting to Discord bots, thank you very much.

earnest phoenix
#

LOL

#

@earnest phoenix remplace msg by message god

#

Line 26

#

I DID

#
client.on("message", async (message) => {
if(!msg.guild || messsage.channel.type !== 'text') return;
  if (message.author === client.user) return;
#

Buy glasses

#
client.on("message", async (message) => {
if(!message.guild || messsage.channel.type !== 'text') return;
  if (message.author === client.user) return;
  let messageArray = message.content.split(" ");
  let cmd = messageArray[0];
  let args = messageArray.slice(1);

#

is this even close to right

#

or no

#

just try that

#

You have some visuals error

#

how do i fix it

#

Really?

#

i give up

#

@earnest phoenix you have put "messsages"

#

With three "s"

#

@earnest phoenix learn js

#

yup

#

exactly

#

@earnest phoenix js its easy and ask for help for "basics" are not good, just learn js before asking help

#

Watch Tsc on ytb nice person for learning js quick and easily

#

Or look js docs

quiet topaz
unique nimbus
#

Go into command prompt and do pip install discord.py

quiet topaz
#

ok

#

ah

unique nimbus
#

yes

quiet topaz
#

thanks

unique nimbus
#

np

quiet topaz
earnest phoenix
#

i tink

unique nimbus
#

@quiet topaz

quiet topaz
#

ok

earnest phoenix
#

how to send emotes

#

in bot

#

was it :server-id\emote:

amber fractal
#

![mmLol](https://cdn.discordapp.com/emojis/356831697385422848.webp?size=128 "mmLol")

#

<:name:emoji_id>

earnest phoenix
#

am I doing wrong ?

    let member = message.mentions.users.first();
    let emote = {
        'no': client.emojis.find(e => e.name === 'tickNo'),
        'yes': client.emojis.find(e => e.name === 'tickYes'),
    };
    if(!member) return message.channel.send(fastembed(config.mavi, `${emote = 'no'} Please enter a valid member!`));
#

i tried ${emote('no')} which didnt work

mossy vine
#

emote is not a function

#

emote['no']

#

also idk if you need to make them strings

#

you can just do no: client.emojis...

#

nvm you can make them strings as well

earnest phoenix
#

it returns null

#

im tryna get tickNo emote from this guild

mossy vine
#

yeah then dont make them strings lol

earnest phoenix
mossy vine
#
let emote = {
        no: client.emojis.find(e => e.name === 'tickNo'),
        yes: client.emojis.find(e => e.name === 'tickYes'),
    };```
#

and then do either emote['no'] or emote.no

earnest phoenix
#

i did that

mossy vine
#

what does your code look like now

earnest phoenix
#
    let member = message.mentions.users.first();
    let emote = {
        no: client.emojis.find(e => e.name === 'tickNo'),
        yes: client.emojis.find(e => e.name === 'tickYes')
    };
    if(!member) return message.channel.send(fastembed(config.mavi, `:${emote.no}: Please enter a valid member!`));
mossy vine
#

oh wait i know why

earnest phoenix
#

i placed : to message just in case lol

mossy vine
#

just do this

#

finding by name might return a different emoji if another guild has an emoji witht he same name

#

so you may not have the same result

#

plus, client.emojis.find will return an Emoji object

#

so trying to send that whole thing likely wont work because of a message too long error

#

so... you just dont care about 2 solutions i provided..

#

ok nvm

earnest phoenix
#

trying it rn

#

lol

#

i needed to send emote to get id

#

well uh

#

:tickNo: aint working

mossy vine
#

whats your code look like

earnest phoenix
#
let member = message.mentions.users.first();
    let emote = {
        no: client.emojis.find(e => e.name === 'tickNo'),
        yes: client.emojis.find(e => e.name === 'tickYes')
    };

    if(!member) return message.channel.send(fastembed(config.mavi, `:tickNo: Please enter a valid member!`));
#

damm discord

mossy vine
#

thats not how you do it smh can you read

earnest phoenix
#

that is

#

i cannot type it

mossy vine
earnest phoenix
mossy vine
#

oh

earnest phoenix
#

discord transforms it

mossy vine
#

ok i have no idea lmao

earnest phoenix
#

thanks for preciuos help

#

my code is 🍝

#
const Discord = require ("discord.js");
const fs = require ("fs");
const bc = JSON.parse(fs.readFileSync("./blacklist.json", "utf8"));

module.exports.run = async (bot, message, args) => {

    message.delete(message.author);
    let staff = ["546968486606536706", "390574128890904579"];
    if(!staff.includes(message.author.id)) return message.channel.send("⛔ Tu n'es pas un membre du staff.").then(msg => msg.delete(2000));
    let id = args.slice(1)[0];
    let raison = args.slice(2).join(" ");
    if(!id && raison) return message.channel.send("Usage : `t/addbl (id) (raison)`");
    if(bc[id]) return message.channel.send("**❌ L'utilisateur est déjà blacklist.**");

    let blacklist1 = new Discord.RichEmbed()
        .setTitle("🔒 Une personne en plus dans la blacklist !")
        .addField("👤 Utilisateur :", `<@${id}>`)
        .addField("🆔 ID :", `${id}`)
        .addField("➰ Raison :", raison);
    bot.channels.find('id', "583581316423876608").send(blacklist1);

    fs.writeFile("./blacklist.json", JSON.stringify(bc), (err) => { if (err) console.error(err);});
    message.channel.send(`**✅ L\'identifiant ${id} à bien été ajouté à la blacklist.**`).then(msg => msg.delete(5000));

};

module.exports.help = {
    name:"addbl"
};

RichEmbed error at raison.
How can i do ?

mossy vine
#

knowing the error would help

earnest phoenix
#

(node:14936) UnhandledPromiseRejectionWarning: RangeError: RichEmbed field values may not be empty.

mossy vine
#

thats because raison is undefined or is empty

earnest phoenix
#

look, I defined it

mossy vine
#

then it is empty

earnest phoenix
#

huum

pallid zinc
#

Can I count member with a role

#

Like if the member is having a role member the bot show <user>have role member

earnest phoenix
#

I filled it, and its gives the same error

pallid zinc
#

Answering me?

earnest phoenix
#

no

#

@pallid zinc yes you can

pallid zinc
#

How

earnest phoenix
#

just filter member with a role and then do .size

pallid zinc
#

Can you give example?

earnest phoenix
#

let roleID = "264410914592129025"; let membersWithRole = message.guild.roles.get(roleID).members; console.log(`Got ${membersWithRole.size}`)

pallid zinc
#
console.log(`Got ${membersWithRole.size}`) ```
#

What if i want it in status

earnest phoenix
#

?

#

What status? @pallid zinc

pallid zinc
#

Activity

coarse patrol
#

const Discord = require('discord.js');

exports.run = (bot, message, args, tools) => {
message.delete();
let logs = message.guild.channels.find("name", "logs")
message.delete();
if(!message.member.hasPermission("MANAGE_MESSAGES")){
message.channel.send("Sorry " + message.author + ", You do not have permission to use this command." + \n + "In order to use this command you need: MANAGE_MESSAGES")
return;
}
let botmessage = args.join(" ");
message.channel.send(botmessage);

let logEmbed = new Discord.RichEmbed()
.setTitle("say")
.addField("Moderator:", message.author)
.addField("Channel", message.channel)
.addField("Message", args.join(" "))
.setColor("RED")
logs.send(logEmbed)
}

module.exports.help = {
name:"say"
}

#

There is no error.

#

But it doesn't work.

#

It doesn't delete my command usage or send a message.

#

Anybody know how to fix this?

earnest phoenix
#

Bad return?

coarse patrol
#

Literally no errors.

#

Nothing showing that it has a problem.

digital sparrow
#

gey

coarse patrol
#

.

digital sparrow
#

me pro

coarse patrol
#

Oh yes, I'm sorry you "pro"

digital sparrow
#

lol

#

jk

earnest phoenix
#

@coarse patrol bad return dude

coarse patrol
#

I don't know how to fix it. Just by saying bad return, doesn't fix anything for me.

mossy vine
#

@earnest phoenix actually, return; is perfectly valid

quartz kindle
#

How abou using code blocks?

#

I cant understand anything like that

earnest phoenix
#

Idk but no error in the command

digital sparrow
#

how to make database discord.js

mossy vine
#

@digital sparrow you dont make a database with discord.js, but use literally any existing database that works with javascript

#

but noone should have to explain that to a "pro"

quartz kindle
#

Google databases for node.js

#

@coarse patrol show your main file, also use code blocks please

digital sparrow
#

what is mongoose?

earnest phoenix
#

A database

mossy vine
#

there are 2 other things wrong with it as well. deleting the message twice (before even checking if the user can do that) and not passing a function to .find

quartz kindle
#

A library for mongodb

mossy vine
#

^

digital sparrow
#

how to use it?

quartz kindle
#

Read the docs, read the mongodb website

digital sparrow
#

kk

#

is good?

coarse patrol
#

Tim.

mossy vine
#

every database is good

#

except using a fucking json file as a database xd

coarse patrol
#

By Code Blocks, you mean the program?

mossy vine
#

no

#

code blocks

coarse patrol
#

i dont know what that is

mossy vine
#
//your code here```
digital sparrow
#

lol me use json as a database :v

mossy vine
#

dont

quartz kindle
#

Json is fine if you know how to use it properly

mossy vine
#

knowing how stupid 90% of bot developers here are, you will just end up corrupting it

quartz kindle
#

But most people dont

#

A proper database is much faster and much safer

mossy vine
#

^^^^^^^

quartz kindle
#

If you need light weight, go sqlite

#

If you need something big and heavy, go mysql or postgre

#

If you need document style go mongodb

digital sparrow
#

ok

quartz kindle
#

If you need maximum performance go redis

mossy vine
#

what do you mean by document style?

quartz kindle
#

If you want to be cool, chose any of the other 848295 databases out there

mossy vine
#

also isnt redis a cache server?

slender thistle
#

Mongo is documents :^)

quartz kindle
#

Its a ram database with disk persistence

#

Document style meaning it stores documents instead of tables and rows

mossy vine
#

a

quartz kindle
#

Documents are similar to js objects

mossy vine
#

which is exactly what i need right now

#

mongo can store a json string as well right?

slender thistle
#

JSON string? ThinkingButUpsideDown

mossy vine
#

a string thats json data

slender thistle
#

Sure it can?

quartz kindle
#

Mongo is useful for being schema-less, meaning yoi dont need to define columns and stick with tjem, yoi can create and edit keys as you need them

mossy vine
#

yeah that sounds perfect for my use

slender thistle
#

Are you typing yoi on purpose

mossy vine
#

yoink

quartz kindle
#

Im on the pgone without autocoreect

#

Phone

slender thistle
#

F

jolly sentinel
#

F

quartz kindle
#

I hate autocorrect lol

hushed berry
#

okay

slender thistle
#

Understandable

digital sparrow
#

hey guys help me make embed page?

mossy vine
#

what

digital sparrow
#

embed page

#

like have 2page when we react -> it will go page 2

mossy vine
#

oh you mean pagination

earnest phoenix
#

its ez

digital sparrow
#

yes

earnest phoenix
#

do it like

digital sparrow
#

tell me pls

earnest phoenix
#

<your embed>.setDescription(new-variable)

#

so it will change whole desc

mossy vine
#

that wont do pagination tho

#

and will only change before embed is sent

copper cradle
#

^

digital sparrow
#

askdnadaisdnidoaisd

amber fractal
#

Uh ok

opaque eagle
#

Think about it... make an array of embed objects, send the first one, and react with number emojis... if the reaction for number n fires, edit that embed message and send the embed of index n-1... pretty basic logic

amber fractal
#

Theres a tutorial for this

opaque eagle
#

There’s also something called a brain

amber fractal
#

And that

#

I use pages for everything over like 10 fields

#

That's usually my max

opaque eagle
#

Now that I think about it I could probably make an npm module for this and it would get decent downloads lol

copper cradle
#

do it

amber fractal
#

^

earnest phoenix
#

^
^

amber fractal
#

That'd get many downloads

opaque eagle
#

I just have to modularize some aspects of pre-existing code...

copper cradle
#

I would use it

opaque eagle
#

Like the class I re-use in my projects is designed to work with Eris... I’d just have to make it d.js-compliant and then publish... prob this weekend

amber fractal
#

I have a function that turns any array into a paged embed, it could be done with objects aswell

mossy vine
#

i have a class that should work with every js library iirc

#

yeah, works with everythin

#

you handle everything manually tho xd

#
class paginator {
    constructor(client, fields) {
        this.client = client
        this.fields = fields
        this.counter = 0
    }
    
    next() {
        if(this.counter + 1 < this.fields.length) {
            this.counter++
            return this.fields[this.counter]
        }    
    }
    
    back() {
        if(this.counter - 1 >= 0) {
            this.counter--
            return this.fields[this.counter]
        }
    }
}
jolly sentinel
#

I just figured out how to make a command I have more efficient but I'm already far as fuck from home

#

S h i t

amber fractal
#

@opaque eagle were you actually gonna do that? mmLol

opaque eagle
#

Yeah

lime fiber
#

How can I use the f parameter in python?
I'm tried this, but I'm getting syntax error 😦

mossy vine
#

... what is the syntax error?

lime fiber