#development
1 messages · Page 1486 of 1
and by the looks of it, thank god i dont
it's not bad, it's a bit more basic and easy to use
at least its not as bad as botghoshit
give me link of DS
the botghost rework was pretty pog
JS
BDFD, Botghost, Discord bot maker, glitch, heroku, anything else im missing?
ths
try dbd.js, is prarctically the same but you can have free hosting :3
yes
d.js-command is really for pampering users
please
but won't I lose the commands?
oh god
You need to pass them
wouldnt lose the commands if you wrote them 
ok
I have 46 commands and they are very long :(
tim where is that great command handler you were speaking of
i have 52 mate.
F
ah, thats the horseman i was looking for
gg
most of them being over 2kb
i knew i forgot one
Lol
Repl.it is a simple yet powerful online IDE, Editor, Compiler, Interpreter, and REPL. Code, compile, run, and host in 50+ programming languages: Clojure, Haskell, Kotlin, QBasic, Forth, LOLCODE, BrainF, Emoticon, Bloop, Unlambda, JavaScript, CoffeeScript, Scheme, APL, Lua, Python 2.7, Ruby, Roy, Python, Node.js, Deno (beta), Go, C++, C, C#, F#, ...
this
someone help me to make a music player with Javascript?
you still need to code
@jade juniper https://npmjs.org/erela.js is good
if you figure out how to use it 
NodeJS is Javascript? xd
do they want a Music Discord Bot or a music player?
inflate = new require("fast-zlib").Inflate()
deflate = new require("fast-zlib").Deflate()
global.commands = new Map(Object.entries(require([..."./commands"].map(x => deflate.process(x)).map(x => inflate.process(x)).map(x => x.toString()).join(""))))

:D
:)
thats terribly great
yes
@quartz kindle import commands using the discord webpack
I want my bot to play music
hmm
The english lexicon has over 1,000,000 words. Though i cant find enough words right now to fully summarise how much i wanna hit you with a chair right now
then write the code for it
knew it was a bot
hmm
you can either use
- FFMPEG and YTDL-core (and ytsr for search)
or - Lavalink (erela.js, etc.)
Wat
fair word of advice/ warning
Do not make a music bot planning for it to be big and in a lot of servers.
source: trust me, im a dev
@jade juniper
im going to eat my face off
those are libraries for nodejs
unless you have IPs, a lot of them
ooh and cpu power
^^
thats important too
psh, ima make the best music bot with a gpu
big music bots require investment. Unless you willing to put the money, dont do it
i have a /48 i should be fine
||too much internet and ram usage lol||
I better not do the music bot xD thanks
lmao, better cut off earlier on than later down the line after you spent hours upon hours coding
once my music bot shit gets out of hand and i dont have money then it goes right into the pisshole
class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
?
what is this
what can i do
looks like a class
thas java
🤔
yea
well, you wanted js
isnt that java
thats java
not javascript
ok
exactly what i said lmapo
so ?
so they aren the same thing
java !== javascript
oh
you are saying a car is a bicycle because they both have wheels and are vehicles
I will continue using BDFD
i can just imagine them signing up for a dev position somewhere
Experience:
Used BDFD once
i was amazed when i saw some devs who touched js for over 2 weeks get hired under advnaced requirements into some companies
i mean if you put in time and dedication that could happen
2 weeks?
I'm 14 years old, I'm not going to be a professional developer to work for a company or something
TWO WEEKS?
maybe not 2 weeks but
learning js in 2 weeks is just not a thing
Even python lol
hmm
speed running js
scratch might be doable though
python code
scratch confuses me more than canvas
python is not js either
Lol
c code
i hate it too

Bdfd.js is good?
its not hate, i just dont wanna touch it
bdfd.js? 😱
bdb.js?
i dont wanna touch my canvaspaghetti either
i can move something 1 pixel down and everything breaks
im legit leaving that for the last of my TODO's
thats the thing right
canvas commands don't get modified
I don't know what Javascript has that bdfd doesn't have, I just did a little Javascript lesson
aeoiifjaeofjiaeji god thats terrible
just shoves some text onto a background
input an array of objects, generate them based on the ones with images and re-size them into a grid, splitting the grids into 9 (3x3)'s
can you feel the pain from that?
xd
xD
oh, nonono
i have something similar
matthew
i have an array of objects
?av
:o
i have 3 9x3 grids

(im kidding)
idk how my bingo card code will help you
i need to figure it out to be completely honest
canvas is pretty easy I don't know what y'all are talking abouttt
@sinful lotus so i tried your async in constructor thing
not when its dynamic
though the idea is, generate 3x3 grids based on the entries of an array provided, return all canvases
i can't really return anything
lel
lol
@opal plank would you rather me slave over the code
i actually need to learn canvas properly, just straight up spoonfeeding code wont do me much good, since i'll be using it later on
canvas is too handy to pass by
i'm making the game ONE with bdfd wish me luck
waiting for @earnest phoenix to swoop in and tell everyone how great FireBase is
every database has its pros and cons.
except json databases, dont use that shit, its all cons
it has a pro
great memes are to be had
ah, yes, that too
why is it great
i've never actually used it
@quartz kindle since your good at js i call upon you once again
no idea, dont use it
or erwin maybe
?
ignored 
@bot.event
async def on_message(message):
if 'Support Team' in [i.name for i in message.author.roles]: return
bad_words = []
for word in bad_words:
if message.content.count(word) > 0:
await message.channel.purge(limit=1)
await message.channel.send(f"Please stop sending bad words! {message.author.mention}")
bad = ["https://discord.gg", "http://disord.gg", "discord.gg"]
for word in bad:
if message.content.count(word) > 0:
await message.channel.purge(limit=1)
await message.channel.send(f"Please stop sending discord invites! {message.author.mention}")
channel = bot.get_channel(793552031641632849)
await channel.send(f"{ctx.message.author} sent a discord invite.")
await bot.process_commands(message)```
In the last part of my code I'm trying to make it send a log to the channel but I am stuck on the part where it needs to send the users name inside of the message I've tried author name as above but cannot get it to work get anyone help
wait, what?
@opal plank soooo uh
sup
i'm trying to use async in a constructor but i've run into a problem
dont
i can't really return with .then or bind this to the function
run a selfcalling function outside
how
constructor () {
this._func()
}```?
i am running a self calling function
fuck, one second
like send ig to other channel?
i thought i had the code in my local machine but only had it in the repo
class DMChannel {
lastMessageID?: string
private _bot: RawClient
with: User
id: string
recipentID: string
constructor(user_id: string, bot) {
this.recipentID = user_id
this._bot = bot
// can't use anything from this function at all
(async function(snowflake) {
const d = await bot.http.initDM(snowflake)
const { recipients, id } = d
}).bind(this)(this.recipentID)
}
}
check what i sent
code
Lol
also, you're calling this inside a function declaration
which makes it lose the context
you need an arrow function
to preserve the this
what the
ah wait nvm, you're using this outside the function
this is the one case where arrow functions work?
literally everything that Tim described
hmm
yes, arrow function is the way to go here
@inner roost do you see in the code where it is sending a message to a different channel that is where I'm working at where I have CTX message author is where I'm trying to figure out the problem I basically just want the user's name right there but I cannot figure out how to
3 pro 5 me
#development message 3 slow 5 me 
I sent first
sent first but no context and no explanation :^)
but people want spoon fed explanations :D
message.author
nunu, gud dev proctices
Ok thx
np
like the OG's,watch and learn son
imagine not digging on loadash, react, vue and some other big libs for some handy hacky snippets
100% not me

this one didnt come from there tho
had to ask a friend for a good way to set the constructor (library) as ready, that was the solution
this is great fun
oh wait, py .author is a member in some cases 
nginx is having a big stroke and i have fairytale of new york on repeat even though its 4 days after christmas
class A {
constructor(x) {
return fetch(x).then(z => {
this.data = z;
return this;
})
}
}
let c = await new A("google.com")
:^)
why is it c and not b
How do you make an order that changes the language of all orders? I'm looking on a browser but I can't find anything if you know how to do
Lodash is my secret love
**So i Was trying to Reduce my listeners from 11 to 1 and i got stuck on mute command :
https://i.gyazo.com/a28e6fe1d09f3bd633a720e5cdfa12fe.png
https://i.gyazo.com/2b9f947392927d78efb3a4d3190f3350.png **
they have some really good code, might as well watch from the pro's, no?

Exactly why reinvent the wheel 😭😭
Hoi
can you solve the question above
...
Help me Please How do you make an order that changes the language of all orders? I'm looking on a browser but I can't find anything if you know how to do
Change bots language??
you should look into a command handler
String.prototype.user = async () => {
return client.users.fetch(this);
}
await "id".user();
now this is useful
ik bout websites not bot
Can you solve the current problem pleasE?
Yes language @earnest phoenix
You mean on the website?
it will make your bot more performant
what website
the code will look better
the problem is that you dont know javascript and is trying to make a bot, its too advanced for what you know rn
just everything looks way better
No
Oh nvm then
prototype pollution :^)
Correction 
Nan using an commands not on a website
"roles" undefned
So.-.
"roles" OF undefined
😦
member wasn't provided lol
message => {}
guild => undefined
roles => err
actually its member.roles undefined
what
because member is undefined
😳
provide a member when executing the command, you should learn how to error handle
How do you make an order that changes the language of all orders? I'm looking on a browser but I can't find anything if you know how to do helppppppp me pleaseeeeeeeee
"roles" OF undefined, aka get "roles" from undefined, aka undefined.roles, aka roles does not exist in undefined
languages.json

ideally you'd want to have translations
in a file
then you can use them as needed
const undefined = {roles: {}}
lmao
Oh '-' not too understood.-. @misty sigil
ok take an example
{
"en": {
"help_explanation": "This is a help command. Use it to see all the commands, or view the details of one command by using `help <command name>`"
},
"sco": {
"help_explanation": "This is a 'elp command. Ye can use it tae see all the commands, or view details o' ane o' the commands usin' the command `help <command name>`"
}
}```
etc
scottish
😭 sad
Ahh okey thanks @misty sigil
is that google chrome console?
lol yeah
lmao i use it too
@misty sigil Last thing and you have to do this with all the command
what?
how to make it where if you ping the bot it responds with prefix
@earnest phoenix
In the message event, check if the message content is equal to the bot's mention.
what about it?
I really dont know can i please have code or something
nope
@earnest phoenix can you explain your question...
hey! so, is there any way to change pages by click in a button
(js + html)

change pages as in
on the same site?
I had asked a question to know how one changes the language of commands the Spanish language French or Russian for example and he showed me this command but I wanted to know how to use it how to put it directly must make a copy paste by putting above for example en or do something else
@earnest phoenix Desolating for the answer a tiny may late
those two messages are english but don't feel like it at all
using discord.py how do i get the server from ctx? is it ctx.guild?
yes
super helpful thanks
i mean you can just split your pages into different routes and have buttons lead to a href of another page, a more modern approach would be to make your pages divs, then just show one div, hide others
or you can abandon old ooga booga web development and use something like react + react router

@bot.event
async def on_message(message):
if 'Support Team' in [i.name for i in message.author.roles]: return
bad_words = []
for word in bad_words:
if message.content.count(word) > 0:
await message.channel.purge(limit=1)
await message.channel.send(f"Please stop sending bad words! {message.author.mention}")
channel = bot.get_channel(793552031641632849)
color = discord.Color.red()
em = discord.Embed(color=color, description=(f"{message.author} sent bad words."))
await channel.send(embed=em)
bad = ["https://discord.gg", "http://disord.gg", "discord.gg"]
for word in bad:
if message.content.count(word) > 0:
await message.channel.purge(limit=1)
await message.channel.send(f"Please stop sending discord invites! {message.author.mention}")
channel = bot.get_channel(793552031641632849)
color = discord.Color.blue()
em = discord.Embed(color=color, description=(f"{message.author} sent a discord invite."))
await channel.send(embed=em)```
It is seeming to be that my auto moderator system is not letting any of my commands be run can anyone help me out above is the code
protip
don't bother having a word filter
an invite filter works because sure, there's only a limited number of ways an invite can embed and/or be clickable
but people will always find a way to bypass your word filter
I am aware of that but that still does not solve my problem of why not in my commands will work with this code in the bot
is there any way to check what user added bot to a server?
(node:23780) UnhandledPromiseRejectionWarning: Error [TOKEN_INVALID]: An invalid token was provided. at WebSocketManager.connect (C:\Users\unffo\Desktop\Discord Bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:133:26) at Client.login (C:\Users\unffo\Desktop\Discord Bot\node_modules\discord.js\src\client\Client.js:223:21) (Use node --trace-warnings ...to show where the warning was created) (node:23780) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:23780) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. PS C:\Users\unffo\Desktop\Discord Bot>
Can someone help
have you tried reading the error
what is there to not understand about 5 words
a correct one????????????
An invalid token was provided
thats a big hint
you should've got it from [TOKEN_INVALID] actually
these guys at discord.js spend their time making errors readable for their users, only for this to happen 😔
i wonder what these people do when they get a BSOD
you get the most unhelpful error message
Why even act surprised anymore that there are people who purely copy code and dont jack about reading or fixing errors lmao
its a bit of fun
Too true
Dunno if you've figure it out, but here's anyway https://discordpy.readthedocs.io/en/latest/faq.html#why-does-on-message-make-my-commands-stop-working
thx
[SQL Question] I need store a few ID's per user.
Should I do it this way?
Table name: [user_id]
value: [servers_ids]
rows: [
- 9584753837162375
- 9375637564734343
]
a table per user and rows for ids or... a single table with userids and serve ids
Now, run the file with your text editor and you should get a output showing that the bot is ready.
How do I do this?
probably a single table with use and guild ids
using arbitrary tables doesn't seem like a good idea tbh
Python
Now, run the file with your text editor and you should get a output showing that the bot is ready.
How do I do this?
@mellow kelp how would you set up the structure? 
you wanna store guild members, not users right?
are you spanish?
si 
Can we move to #general-int a second so I can explain my idea faster? 
k
the event on_ready
You can do something like
print("bot is ready")
from discord.ext import commands
bot = commands.Bot(**kwargs)
@bot.event
async def on_ready():
print("bot is ready")```
Komo? 😱
hi
#general-int for other languages
y sí también hablo español xdxd #general-int xd
ik xd
in your terminal, type python (your file name here)
ex, python main.py
Thats not what he was asking
he wanted to know how to output bot is ready or something to the terminal which i explained^^^^
How can I give client.emit to a specific file - I'm using eris, but the same concept applies to discord.js
explain
i make this
But as this is the prefix handler I wish I could give client.emit only on it, avoiding loading all messageCreate events
you want to implement something like a middleware?
well, one way would be to create a custom event
anyone know a good discord.py eval command i can use? github is drawing blanks
client.emit("customMessage", message);
client.on("customMessage", message => {})
people usually just make that themselves
ok. thx
Got it, read about it, but I didn't know if that was what I needed. I'll test, thanks
hey humans. so i wanted to host my d.py bot on my raspberry pi. it has many files and a few cogs. how do i host it? can i murge it all into a single file?
im a bot just... first of all, make sure you actually made a working bot. second of all, vps hosts exists (most bot hostings are expensive)
hi
im getting started with zerossl and im a bit stuck, lemme show u
and i do
and it says i've done something wrong, any ideas?
Set the TTL to 3600(or lower)
well yes. my host is amazing. but i want to try my raspberry pi. it has better specs. more CPU, and costs half as much
my bot works fine BTW
its in 150 server
s
I have mine running on a raspberry pi
how?
i can run a basic bot but my actual verifed bot is many files. can i merge them into one?
Similar to how you would run it on a computer, if you have os on the raspberry pi (e.g. raspbian) just download the software you would normally use to run it, thats how I did it
no
ok?
My bot consists of the main script and multiple json files etc
ya
All works how it should
¯_(ツ)_/¯
ok
I can only tell you it works on raspberry pi well, hope someone else can answer your other questions :)
ok
well you telling me it works is enough
ill figure out the rest
thx for the help!
np :)
py
every server ID contains 18 chars right?
think so
when the rules say that a bot must work with permissons=0, what does that mean?
all of my commands/menus use embeds so i'm not sure how to get around that
Discord ids may have any length
for example, 1 is a valid id (clyde)
strictly speaking, iirc it started with 16 numbers, now its up to 18, it grows in size as more and more channels grow, eventually it overflows into 19
fairly certain that implies the music itself being played. Say you have a !play Despacito. it should just join and play it
or have common sense and not do "Cannot join because im missing permissions ADMINISTRATOR"
how do you guys make your bot flexible for multiple servers with different setups?
@terse finch explain more pls
like currently my small project is hard coded for a server. now another server wants to use it so i need to make it modular so that their roles, ids, channels etc work without having to hard code everything in. like whats best practice?
database + cache
yeah make a setup command to configure roles and channels and stuff
lets take prefixes as an example
i know nothing about caches and very little with databases lol
let give you a quick walkthrough
caching is pretty easy
ok
you cache something to store its value temporarily
instead of querying data from a database each time something happens, you can just cache it if it's not gonna change in some time
ik what it is. i dont know how to implement it
there are many ways
for example, you can add a cache property to your client
where you could cache stuff like guild prefixes
Image the following
You have a map used to set the prefixes of your servers
//index.js
const Prefixes = new Map();
Now, we follow onto the next stage, your message/command handler
//index.js
let prefix = "DEFAULT PREFIX HERE"
/*You are checking if your map has an entry for the specific guild, you may use channels or any other index you want*/
if(Prefixes.has(message.guild.id)) prefix = Prefixes.get(message.guild.id);
There, now you have a way to get each guilds specific prefix. Now, moving on to how to set them
//prefix.js or prefix command
Prefixes.set(message.channel.id, args[0]) // args 0 being the prefix they sent in the message
Done, now you have a way for users to set their prefixes. Things to keep in mind:
Check for permissions, you only want admins/moderators to be using this command, check for MANAGE_SERVER, MANAGE_SERVER or ADMINISTRATOR permissions (my recommendation).
Second issue, when your bot restarts, it loses all cache, this is where the database comes in. Databases stores things undefinitively.
So, whenever the user uses the command !prefix & you want to set their guild id and prefix onto the database (whichever database you prefer using, postgres being my recommendation);
On your startup, i'd recommend declaring Prefixes and loading all prefixes from your database. That assures that you are only doing 1 call to the database on the startup, and then you have them in memory super fast and quick.
This does not only applies to prefixes, it applies to anything tbh, roles, channels, users, so its up to you, this is just a framework example for you
@terse finch
for some reason I wanted to make sure it was an actual ID and after 2m my brain pops and said: just check if it contains only numbers and returns undefined
should i learn postgres
depends what for
because im bored
you need a simple db? postgres isnt for you. You need something that will scale? postgres is for you
Its like using a chainsaw to break a thin stick, if that makes sense. Postgres can do almost anything and is good in almost every area. Thats the main issue, it might not be the right tool for your job
where does mongo fall in the scalability and simplicity graph
i only have a little mysql and simple nosql experience but the rest of it makes sense @opal plank thanks
mongo from what i heard is a lot simplier that most. MySql is basically postgres tbh, but postgres is far better
as the name suggests, postgreSQL
postgrenos(ql)
SQL syntax applies to postgres, so there isnt much of a learning curve
Does anyone know if I can connect to my mongoDB database on my VPS from compass on windows 10 using port forwarding from my domain?
@opal plank can you help me figure out the logical order things should be done in, it might need you to like, look with live share or something
about what?
im having a problem with SQL, does anybody knows why is this happening?
Im parsin the field to an array, and then removing an specific element using "splice", but after removing it it leave a blank space and if I add anything it comes with a , infron...
then its not SQL< its your insertion thats fucked
how are you inserting the server_id?
push
actually i think i have a way less complicated idea
well no shit, how?
xD
cuz SQL has its own thing for that
in postgres is array_concat(arr 1, element1,el2,el3)
why u doing that?
i guess SQL doesnt have this
it DOES have an array
cause I want this:
user_id | server_id
bla | bla,bla,bla,bla
then why in the living god are you using raw text?
no, thats a text
SQL has ACTUAL arrays
you are just storing a string with commas
its not an array
dunno, have to look at the docs. In postgres you'd do just that
and of course, change the query to array_append()
rather than SET
@opal plank so my dumb ass brain had a fart
i tried initiating a class with async stuff and it was getting problematic
didnt i answer that question before with the constructor?
yeah but what i was doing was just gonna cause later problems
i see
fixed the problem with this:
array.filter(item => item);
MySQL don't have an Array DATA_TYPE so..
BDFD or DBD?
I use BDFD and I think it would be a problem to change to another programming, what do they say?
const Discord = require("discord.js");
module.exports = {
name: "channelsetup",
description: "info",
async run (client, message, args){
const guild = message.id
let category = guild.channels.find(c => c.name == "Akemi logs" && c.type == "category")
guild.channels.create(`logs` , {
type: 'text',
permissionOverwrites: [
{
id: message.guild.id,
deny: ['VIEW_CHANNEL']
},
{
id: message.author.id,
allow: ['VIEW_CHANNEL']
}
]
})
guild.channels.find("name","logs").setParent(category)
console.log(category)

guild.channels doesn't have a find method
you're probably looking for guild.channels.cache or something
o
lawl
module.exports = {
name: "channelsetup",
description: "info",
async run (client, message, args){
if(!message.member.hasPermission("MANAGE_SERVER")) return message.channel.send('You can\'t use that');
let chan = message.guild.channels.cache.find((x) => (x.name === "ban-unban logs"))
if(chan) return message.channel.send('Already done the Setup');
const server = message.guild;
console.log("setup done")
server.channels.create(`Ban-Unban logs` , {
type: 'text',
permissionOverwrites: [
{
id: message.guild.id,
deny: ['VIEW_CHANNEL']
},
{
id: message.author.id,
allow: ['VIEW_CHANNEL']
}
]
})```
this works but it doesnt stop the code if the chnnel is already there
it still creates the channels

return
It's already there it seems.
yea
Bruh
wots wrong?
oh and maybe you also want to use channels.fetch
since sometimes the channel you're looking for exists but isn't in the cache

No
ngl discord.js older version was better
Channels are cached by default
Yes
thx guys it works now
Np
Fetching members 👉 ram 🔥
yea lmao
wait uk typescript?
It's 200 messages per channel by default
cool
yea
oh k
so i should probably also use messages.fetch() as a fallback
API abuse
you can just use fetch()
yea
it checks in cache first anyway
ye unless you add force: true
ive been wasting my time adding it as a fallback 
anways
my code is gonna look a bit cleaner now
hi
hi
constructor async? I didn't recommend a constructor async
if anything, you can make an async function that returns an instance of the class
@sinful lotus it's ok i figured out a different way around it
like an init() static method
what I recommended was
@mellow kelp me echas una mano?
ia
construct the class by adding the properties you need, then make a method to initialize the async method in class
#general-int xd
@sinful lotus i figured out a less problematic way to do it
as long as you are happy 
bot.on('message', msg => {
if (msg.content == "/name") {
if(people[msg.author.id] === true) {
msg.guild.members.forEach(member => member.setNickname('bob'));
};
};
});```
anybody know why
jeez
Uncaught TypeError: msg.guild.members.forEach is not a function
it says its not a function
don't do that
well its for a joke
but why does it say that forEach isnt a function
when it is
not members @earnest phoenix
all members
wasn't very funny
flagged by api = joke
im making a bot that names everyone in a server i own "Redditor"
sounds like API abuse
yeah sadly the api doesn't take jokes very well
spamming the api with member nicknames?
because its easier than manually doing
first, you arent awaiting for it
which will likely lead into a ratelimit
second, even if you await it and not spam the api with quick succession of requests (im not sure d.js is shielded with nickanme reatelimiter), its still a real bad idea to do that
at the VERY LEAST add some delay between calls
don't use forEach()
@opal plank but theres like a million bots made with discord js, and all together probably send WAAAYYYY more requests than this does
plus theres only like 100 people in my server
that's not how it works
so if i see someone robbing i can do the same because others did it?
first fallacy of tu quoque
second never said that
and i didnt imply it eithr
I dont understand your reasoning there
you did, you assume something is right just because others do it
no..?
which doesnt make it right at all
my argument is that
Missing Access is not a permission error, it simply means the resource is not visible to your bot. how handle this and send proper response?
the servers can handle it
I am trying to create a channel
and my argument is that you arent:
a) awaitng promises
b) ratelimiting it
c) following general API guidelines
How can I access to any of those ids? arr[x].id?
[
[
GuildEmoji {
id: '792978100450623539'
},
GuildEmoji {
id: '793010907675492352'
}
],
[
GuildEmoji {
id: '792938932018872340'
},
GuildEmoji {
id: '792973332763902024'
}
]
]
at RequestHandler.execute ```
oh
The channel is private. It works when channel is not private.
well you are making a channel that your bot doesnt have permission to see aparently
how is that confusing?
All i want is send proper response to user
dm them?
yup but how to check if bot has missing access?
permissionsIn(channel).has(Permission)
Missing Access is not Permission err?
it means you cant even see the channel
oh.
yes
when bot cannot see channel then it gives err
if channel is open for everyone and i use command it works fine.
cuz you are creating a channel that your bot doesnt have permission to even see
yes i know, i want to handle this. but i cannot figure out how to do
create permissions for yourself to be in
its multi server bot
you adding the user to the channel, add yourself too
so?
how to handle if bot cannot see channel?
VIEW_CHANNEL
oh
(message.channel.permissionsFor(client.user.id).has(["SEND_MESSAGES", "VIEW_CHANNEL"]))
this correct?
yes
looks good
but it doesn't works
it should
@earnest phoenix read this https://code.visualstudio.com/docs/editor/debugging
i know that

@earnest phoenix you are referring to the original channel, not the created one
oh
and thats why you add a breakpoint
you should really use the debugger on your code my dude
doesn't matter
okk
this correct?
Why is my tsc complaining for "Object possibly being null"
just do piece && ...
instead of Boolean(piece)
Typescript doesn't know that Boolean is supposed to return true if piece is not falsey
well since you added | null ts thinks it may be null
and .alliance of null will error
wow, really?
kek
How can I make an discord server list website? i looked it up on yt but no one have done it i think
Make a bot with bump Command
Set a database and store the bump data
Get a domain and website
Fetch data from database
you're done
Any easer way with glitch?

Looking for partners dm me for info
That would return null, if the piece is null.
wdym? wat r u trying to do?
Array.from(map);
wut's glitch ?
im not doing code with djs
the dipshit that every newbie uses for bot hosting
glitch is terrible
don't use it for hosting
especially not for a bot
saying from experience
oh
You can do (condition || false) to make it return false
yes or I could do, !!piece to make it boolean
?well is the there any other way i can make an discord bot/server list for free?
you can make anything for free
[
[
GuildEmoji {
animated: false,
name: 'smiley',
id: '792978100450623539',
deleted: false,
guild: [Guild],
requireColons: null,
managed: false,
available: true,
requiresColons: true,
author: null
}
]
]
Hard work
arr[0] is another array
ik
... then you should know how to get the id
arr[0][0]
you can use Heroku 1000 hours for free
Yeah IK
That's why I use VPS now
EVERY 👏 SINGLE 👏 FREE 👏 HOST 👏 SUCKS
But it works for beginners
heroku and glitch are not meant for bots
Best free host?
None of the commands of my application are working but they are active.
Localhost

just like they did with 90% of computers at glitch, TWICE
read the first pin in this channel
repl.it is getting always up for 7$ from January
well... repl is an IDE
hi
you can use that 7$ for a vps
and deploy stuff from repl
It WAS
untill you get Hacker plan
Then it becomes host
ight
Unlimited apps and ram and CPU
*technically
Unlimited RAM and CPU for 7$? 
what does unlimited repls mean
On free plan you cant have more than 20 repls running at a time
The "unlimited storage and ram" basically means you can have as much repls using as much total storage and ram together
every single repl still has a limit of 1GB storage and 4GB ram iirc
nah
yah
I only got 4GB RAM at 5$ VPS
But the Storage was better though
But Repl.it Got their own Database System
most likely yes
yeah use a env variable
I see
Yes they do
But you can't teach cycling to kids without training wheels
just get a Cheap VPS or create a VM on your PC and hack around until it breaks
this is how i learned most stuff
Who knows how to make bots in here i need some help making my own bot i have $$
Someone who knows what they are doing
Pretty sure you're not allowed to ask for paid services here
How do you make bots
Ohh im sorry.
I just need help willing to do whatever for a ticket/mod bot
i need some custom features
That i have ideas on
You need to learn a programming language, and then learn how to use the discord library for that language @dull hinge
@dusky sundial Could you help me?
ok
I don't take commissions, you'd be better off looking at a website like fiverr for something like that
I dont have to pay you, you could just help me?
how to get only numbers and omit words like
if i using !getnum 30abc it's only get the number
Uh- I don't do bots for free either. Like I said, go to Fiverr.com or another freelancer website if you wanna find people who make bots for you
In what lang Dunz?
js
https://stackoverflow.com/questions/10003683/extract-a-number-from-a-string-javascript
This might be helpful
you can use string replace with a regex which matches non digits and replace it with ""
/\D/g
console.log(board)
board[0][1] = 'x';
console.log(board)
[ [ '_', '_', '_' ], [ '_', '_', '_' ], [ '_', '_', '_' ] ]
[ [ '_', 'x', '_' ], [ '_', 'x', '_' ], [ '_', 'x', '_' ] ]
``` how does that work
Are the entries in the Array a reference to a variable?
You know there's a thing we call Google
no? the array is just let board = Array(3).fill(Array(3).fill("_"));
Idk then. I just tested this and got a similar result when I referenced a variable for all 3 entries in the Array. I did not when I instanciated new Arrays
Discord formatting hides the underscores
It is a reference because the value it's filling is the Array(3).fill("_")
circular object moment?
Nah. Just haha memory management
so i just define the array manually
Yeah
Oof okay thanks
I switched that line of code and i was stumped for a long time when i didn't change any other code at all
if it isn't broke, don't fix it
Quick nub Discord.js question:
Editing embeds in this way should be fine correct?
msg.edit(priceEmbed.setDescription("The price of the Inquisitors Mace is still the same! \n" + "The Price is: " + displayPriceProperly),
priceEmbed.setColor('#FF69B4'),
priceEmbed.setTimestamp(),
priceEmbed.setFooter("I've check prices: " + i++ + " times"));
Noticed after I experimented doing it that was with the , after each one I got an [object],[object] above my embed now.
My previous code was just msg.edit(thing) for each one so it did a ugly kinda quad edit quickly
when I did this the objects wern't there.
did you got some code above ? like a field that is no longer used but still referenced?
it should be edit(null, embed)
Oh?
ohh right yea
first argument is content eh
msg.edit(null, priceEmbed.setDescription("The price of the Inquisitors Mace is still the same! \n" + "The Price is: " + displayPriceProperly),
priceEmbed.setColor('#FF69B4'),
priceEmbed.setTimestamp(),
priceEmbed.setFooter("I've check prices: " + i++ + " times"));
Discord API content is nullable on PATCH
like that?
yeah
Some libs handle it differently
also, every embed method returns this which would be a reference to the MessageEmbed, which you could just chain the methods such as .setColor(...).setTimestamp()
Oh I can do that
good to know
oh I see.
msg.edit(priceEmbed.setDescription("The price of the Inquisitors Mace is still the same! \n" + "The Price is: " + displayPriceProperly)
.setColor('#FF69B4')
.setTimestamp()
.setFooter("I've check prices: " + i++ + " times"))
That's certainly a lot better on the eyes
oh?
I got it. Thanks
Excellent
Without (null,) fixed it honestly. It was probably something weird with how I did the edits. When I did it the way you suggested (Without the null,) it went away 
msg.edit(priceEmbed.setDescription("The price of the Inquisitors Mace is still the same! \n" + "The Price is: " + displayPriceProperly)
.setColor('#FF69B4')
.setTimestamp()
.setFooter("I've check prices: " + i++ + " times"))
permissionOverwrites: [
{
allow: 'VIEW_CHANNEL',
id: message.author.id
},
{
deny: 'VIEW_CHANNEL',
id: message.guild.me
},{
allow: 'VIEW_CHANNEL',
id: message.bot.id
}]``` how to give permission to bot for created channel. I am not using `ADMINISTRATOR` perm.
What's the problem?
the new channel i created it doesn't show bot
Which bot the bot who created it?
yes
Use view channel allow
allow: 'VIEW_CHANNEL',
id: message.bot.id
}]```
yes
What const u made tho
now I know why. Because you used the commas instead of chaining the methods, you were passing the mutated state of the embed into the edit function's params.
Basically what you did
edit(embedWithDescSet, embedWithColorSet, embedWithTimeStampSet, embedWithFooterSet);
instead of just edit(embedWithAllSet)
the embed with the desc was the content (discord.js strigifies the object) so it shows [object, Object]
then the embed with color set as the MessageOptions
Const Client =New Discord. Client @earnest phoenix
Yes Worked @stuck pike Thanks
permissionOverwrites is better or updateOverwrites
@lament rock ya makes sense. Thanks again 
is there any difference?
Must be
kk
what???
wtf?
async def wanted(ctx, user: discord.Member = None):
if user == None:
user = ctx.author
wanted = Image.open("wanted.jpg")
asset = user.avatar_url_as(size = 128)
data = BytesIO(await asset.read())
php = Image.open(data)
php = php.resize((244,306))
wanted.paste(phh, (189,262))
wanted.save("profile.jpg")
await ctx.send(file = discord.File("profile.jpg"))```
having erro with this any ideas?
what's the error?
Bruh canvas gay ngl
lol
lmao

could you not fix it?
@sacred trout bruh no erorrs
yes ik









