#development
1 messages · Page 1532 of 1
while using cogs, can i use data across files? like if i do a = "a" in commands.py and i want to use it in commands2.py, how would i do it?
so... if i understand correctly
the array is a 16x16 grid
and each 1x1 represents a 32x32 area in the canvas?
yes
and you want to draw the array into the canvas?
like 1x1 is drawn at 0x0, 1x2 is drawn at 0x32, etc
yes
so you're missing the relationship between them
and each element has its own height, which relates to its colour
you have to get the array indexes based on where you are in terms of pixels
or the opposite way
draw in a specific location based on where you are in the array
a h
for example
for(let index1 in array) {
for(let index2 in array) {
let x = index1 * 32;
let y = index2 * 32;
if(patt[index1][index2].height != 0) {
ctx.fillStyle(...)
} else {
ctx.fillStyle(...)
}
ctx.fillRect(x,y,32,32)
}
}
the x and y in the canvas is obtained from the indexes you are currently on
thats the relationship that was missing
the code you had before was basically changing the color of the same square 256 times before moving on to the next square
what in the fuck is this
square
square
yeah that makes sense now
LOL SQUARE
Lets go my bot got approved
Congrats
there's an option for it
force https iirc
idk my password so I can't check
I wanna make an AI to do capchas so I don't have to
that would be nice
might do that as my project in 3 years
did you just forget the password for your website's most important thing?
yep
yo wtf
brb
Why do you want to make an ai for it
Just replicate the lego technic robot that passed recaptcha
ah yes ty
Cuz some require the image thing and I suck at that
it's not as easy as you think
reCAPTCHA for example
is much much more than just identifying correct images
if you're suspicious, the images get noise so your AI will most likely fail to identify the correct ones
there are captcha solving services for this
should i be worried that 30% of the people who work solving captchas for this service are from venezuela
probably
but it's better than slaving in some factory
i guess
not that you're not a slave here either
true tho
a recaptcha doesn't even need to see if you clicked the right images. Just needs to see how you solved it
How can you get your bot 24/7 online
it tracks literally everything you do on the page
exactly
that's why recaptcha is so slow to load compared to rest of the page
get a vps
a vps?
virtual private server
a small (virtual) machine you can rent for a few bucks a month
that most of the time has 100% uptime
ok
How do you make it so the bot creates a role in the guild with specific name and perms using discord.js?
docs would know
can you send the docs
thanks
How do you make the bot takes a role and adds it to each guild channel with specific perms?
heyo i need some help, i have it where i can ping my bot and it responds to the ping, but it spams the response... can someone help?
i can send the lines of code
hmm
if (message.content === '@zenith kernel' || '@zenith kernel'){
let embed2 = new MessageEmbed()
.setTitle('Hey there!')
.setDescription(`Hey! I'm Essentials, a fast and simple bot. My prefix is e!`)
.setColor("#FD3917")
message.channel.send(embed2)
}
it works when i have message.content.startsWith but thats not what i want
oh
you probably want to use message.content === 'option-1' || message.content === 'option-2'
@mellow kelp help
oh

Hi i have better squilete 3 error
What is it
Ok wait
How was iy
/rbd/pnpm-volume/2b7b340d-fe94-4793-9ad2-d105633f550d/node_modules/.registry.npmjs.org/quick.db/7.1.3/node_modules/.registry.npmjs.org/quick.db/7.1.3/node_modules/quick.db/node_modules/bindings/bindings.js:135
Idk i just want to make getinvite command i guess
I mean it gets invite from the same server ur in
Even tho u can make one urself
Nvm
I'm just dumb
I'll just go

Use Guildcreate event idk wdym if you could explain more i can help
how can i make element.style.backgroundColor === "#2FFFFF"; work?
ok
Setting
Oh
Lmfao
I don't have brain
worked, ty
and how can i add or remove one specific element with innerhtml?
like one specific item
How do i make it so everytime you send a command, the bot rotates responces
keep a counter
oh ok
if you want a sequential rotation
if you just want random responses, then use Math.random()
m a t h
meth
Quik mafs
oh you got meth tim?
maybe

TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function
I started a message collector, but this weird error happened? What does this mean? I don’t have any prototype in my code...
you're trying to use a function that requires a callback
but you didnt give it one
Oh oops
wait can bots have animated profile pictures or no
no
oof
How do you make a bot edit role permissions in a channel
I refered to the docs but couldnt find anything
the closest thing to this is...
type: 'voice',
permissionOverwrites: [
{
id: message.author.id,
deny: ['VIEW_CHANNEL'],
},
],
})```
But i dont want it to create
how can i get something like this to work? ```js
if (element.style.backgroundColor === "#fd4d4d") {
element.style.backgroundColor = "#2FFFFF";
}
else {
element.style.backgroundColor = "#fd4d4d";
}```
if the background color is that, do this, else, do that
I mean isn't that technically correct?
If color 1, change to color 2, else change to color 1
uhh its not working
like, if the color is fd4d4d, change it to 2FFFFF, if its not fd4d4d, make it fd4d4d
maybe add .toLowerCase()
ok lemme try
if (element.style.backgroundColor.toLocaleLowerCase() == "#fd4d4d") {
element.style.backgroundColor = "#23292e";
} else {
element.style.backgroundColor = "#fd4d4d";
}```?
yeah
not working
Aww
no errors in console
without the Locale, no?
lemme try to print the value
locale?
it makes it the color
so the else works
but the if never does
its in rgb
lemme try something
works!
ty
just had to do it in rgb
and also, how can i like remove or add only 1 specific thing in innerhtml?
i can copy the innerhtml, find what i want to remove, and set the new one without it?
String.replace probably
ok ty
and to just add it, ill just get innerhtml, and just add the new str to it?
can i get the html of an emlement?
like the code of it?
wut?
like with .value i get the input right?
lets say i have div1 with an id of hi
can i get all the code inside the div1?
with the id?
all the html
that's what innerHTML does
innerhtml sets it to the code?
yeah

uhh it doesnt copy the div itself...
like i have a div with the id
if i get the innerhtml of it
yeah
hence inner html
gomme a minm
Depends on what you want to get with .value
You could also use textContent to only get the next of it
Being able to append with += iirc
yea
doesnt seem to do anything
how about react
yea i could do that
Do you have a particular field you want it to be
apart from js/ts not really
then I got nothing for you
so this wierd bug is happening where it needs to have one already in the trade menu for it to work, here is the code
async function displayTradeItems(square_clicked, square_clicked_inside) {
let element = document.getElementById(square_clicked);
let inside = document.getElementById(square_clicked_inside);
let element_nohighlight = element.innerHTML;
let tradeDiv = document.getElementById("tradeBox");
if (inside.style.backgroundColor == "rgb(253, 77, 77)") {
inside.style.backgroundColor = "rgb(35, 41, 46)";
tradeDiv.innerHTML = tradeDiv.innerHTML.replace(element.innerHTML, "");
} else {
inside.style.backgroundColor = "rgb(253, 77, 77)";
tradeDiv.innerHTML = tradeDiv.innerHTML + element_nohighlight;
}
}```
```html
<div id="first">
<div style="width: 6rem; height: 6rem; padding: 10px; margin-left: 10px; border-left: #4eff98 5px solid; background-color: #23292e;" class="tooltip1" onclick="displayTradeItems('first', 'first_in')" id="first_in">
<img src="https://imgur.com/dRFe7wx.png" width="100%">
<span class="tooltiptext1" style="width: 230px;">
<div style="color: #6198f1;">Veld's Baguette Fishing Rod</div>
<div style="margin-top: 5px; border-bottom: #78899b 2px solid; margin-bottom: 9px;"></div>
<div style="color: #3b434b;" align="center"><a style="color:#ff6060">Made from Veld's stolen Baguette.</a></div>
</span>
</div>
</div>```
the picture is what happens when i click it 3 times, aka triggering the right image once, then when i clicked it again, it was supposed to remove the image, then the 3rd time is for it to appear again, but then it just doesnt, and it only works normally after theyres one already therew
clicked it 4 times, this happened
so basically, it works fine, but the "mini cards" that pop up the first time, never goes away
are you sure you want to use vanilla js for this
seems like you're building a complex ui
2008 websites flashback
i just literally need a way to make it show on the side when u click it
its not very complicated
like basically copy the item u clicked's html on the other side
why not use a framework
what exactly do you want to do?
Basically, have it edit the background color when u click it, and basically like make it show on the other side if it's toggled/clicked
Like a checkbox, if it's on, it shows on the other side and has a dof background, if not, it just shows like normal
on click -> toggle class "selected"
add css to class selected for the background color
on click -> run function that copies all items with class "selected" to the other side, and removes all items without the class
Ok I don't really get it and I'm not on my pc Rn, I'll understand u tmr lmfao
But I think I get it
Toggle as in show?
toggle
add if it doesnt have, remove if it does have
element.classList.toggle("selected")
like a checkbox/switch
ok moving members
hey
do you know how I would be able to get userobject
by just doing
!av jenna
they deleted the question but here it goes anyway
await guild.members.fetch({query:"jenna", limit:1})
(assuming discord.js)
yup
learn something every day
you can get up to 100 results
if you have the members intent there's no limit
why does it look like this when im editing the css
then i copy all the css over and it looks like this
where are you editing it? dev tools?
Thanks. Found out that for my specific use case, I could use log2 which is why I deleted, but if I was dealing with a base other than 2, I would use that, so thank you
how can i change the icon
without javascript you can't regardless
reddit = apraw.Reddit(username="",
password="",
client_id="",client_secret="",
user_agent="apraw")
subreddit = reddit.subreddit("memes")
top = subreddit.top(limit=50)
@commands.command()
async def meme(self, ctx, subred="memes"):
subreddit = reddit.subreddit(subred)
all_subs = []
top = await subreddit.top(limit=50)
for subbmission in top:
all_subs.append(subbmission)
random_sub = random.choice(all_subs)
name = random_sub.title
url = random_sub.url
embed = discord.Embed(title=name)
embed.set_image(url=url)
await ctx.send(embed=embed)```
discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.fun' raised an error: AttributeError: 'coroutine' object has no attribute 'top'
U use JavaCord?
???
do i know you @vernal fiber >
Do u use JavaCord?
Is there a way to check if a user has boosted (d.js) other than checking for a role?
You shouldn't use praw
i am using apraw
Still
Pretty sure there is a property for it, cant remember it. Docs would know
wtf is that
subreddit.top must be awaited

ok
What's bad about apraw exactly
This guy must be high
Oops. Not .top, but the subreddit var
Pretty much requesting directly to reddit everytime, can be a trouble in the future if his bot becomes big. It's better to use aiohttp.
... what's the difference between aiohttp and apraw in this case? They don't cache anything
that and the line with subreddit too
Traceback (most recent call last):
File "main.py", line 59, in <module>
client.load_extension(f'cogs.{filename[:-3]}')
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 663, in load_extension
self._load_from_module_spec(spec, name)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 609, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.fun' raised an error: SyntaxError: 'await' outside function (fun.py, line 17)
@slender thistle command so much shorter
'await' outside function
do i add this in the func?
Yes
@slender thistle
getting error bruh
subreddit = await reddit.subreddit("memes")
top = await subreddit.top(limit=50)
Traceback (most recent call last):
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/home/runner/Bot/cogs/fun.py", line 31, in meme
subreddit = await reddit.subreddit("memes")
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/apraw/reddit.py", line 243, in subreddit
await sub.fetch()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/apraw/models/subreddit/subreddit.py", line 170, in fetch
resp = await self._reddit.get(API_PATH["subreddit_about"].format(sub=self.display_name))
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/apraw/reddit.py", line 138, in get
return await self.request_handler.get(*args, **kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/apraw/request_handler.py", line 70, in execute_request
result = await func(self, *args, **kwargs)
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/apraw/request_handler.py", line 88, in get
headers = await self.get_request_headers()
File "/opt/virtualenvs/python3/lib/python3.8/site-packages/apraw/request_handler.py", line 34, in get_request_headers
) + timedelta(seconds=self.user.access_data["expires_in"])
KeyError: 'expires_in'
The above exception was the direct cause of the following exception:
@slender thistle
mmm
sad
newState.guild.channels.create(`${newState.member.user.username} ~ Voice`, {
type: 'voice',
bitrate: 384000,
parent: '798413426086510673',
userLimit: 15,
reason: `Member ${newState.member.user.tag} joined VC`
}).then(async c => {
c.updateOverwrite(newState.id, {
VIEW_CHANNEL: true,
MANAGE_CHANNELS: true,
USE_VAD: true,
MUTE_MEMBERS: true,
DEAFEN_MEMBERS: true,
MOVE_MEMBERS: true,
PRIORITY_SPEAKER: true,
CONNECT: true,
SPEAK: true,
STREAM: true,
CREATE_INSTANT_INVITE: null,
MANAGE_ROLES: true
})```
TypeError: Cannot read property 'updateOverwrite' of undefined
help please
You know you can make the permission overwrites when creating the channel?
i need help too
sh: 1: install-from-cache: Permission denied
Error: EACCES: permission denied, scandir '/root/.nvm/versions/node/v14.15.4/lib/node_modules/firebase-tools/node_modules/re2'
> protobufjs@6.10.2 postinstall /root/.nvm/versions/node/v14.15.4/lib/node_modules/firebase-tools/node_modules/protobufjs
> node scripts/postinstall
internal/modules/cjs/loader.js:834
throw err;
^
Error: Cannot find module '/root/.nvm/versions/node/v14.15.4/lib/node_modules/firebase-tools/node_modules/protobufjs/scripts/postinstall'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:831:15)
at Function.Module._load (internal/modules/cjs/loader.js:687:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/firebase-tools/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/pm2/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! protobufjs@6.10.2 postinstall: `node scripts/postinstall`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the protobufjs@6.10.2 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-01-18T05_27_04_081Z-debug.log
Linking global packages from system...
NVm not orking
@delicate shore you: sup npm: npm WARN notsup
nice
does that work ?
dbl.webhook.on('vote', vote => {
let votechat = client.guild.channels.find(channel => channel.name === "votes")
let voteembed = new Discord.RichEmbed()
.setDescription(`User with ID ${vote.user} just voted!`)
votechat.send(voteembed)
});```
someone must vote bot
Are you using djs v11
Congrats, you're deprecated
isn't there a button to test the webhook on dbls page
where ?
can you give me a link ?
and what ?
does djs have a leave function for the bot?
yes, quite literally a leave method
Guild.leave
what things i must submit in Webhook URL
to test it
I made a tuotorial on top.gg webhook
It's a medium blog
I can share with you if you want
ok
nice
give me link pls
i should make a generator in react
thanks
welcome
@delicate shore dblapi.js is deprecated
it's literally just renamed to node-sdk
windows 7 is deprecated and hit end of LTS
does that mean it doesn't exist
What's an incel
when you get your message removed but all you did was say fax 😔✋
it exists on my computer
ah
nvm - nevermind
nevermind to update npm packages?
Yes
smh
I don't know if you know it but
You are really annoying sometimes just like me
error E@1.0.0: The engine "node" is incompatible with this module. Expected version "12.x". Got "14.15.4"
error Found incompatible module.
which module it's talking abotj
why dont you just run npm install
npm will install the latest version that is compatible with the node version
do npm install || npm i
ok
http://img.censor.bot/TPDQ7fo6 does anyone know how to set the name of this? since the inner image is technically a text element the text of that element gets slapped in front of the servers name, so the T icon + the Testing server name turns into TTesting, i just want it to be Testing, any idea?
Do someone know a good api that gives you random picture link? Such as Shiro api etc...pls
Shiro gud
Yeh but looking for other's
OK
I was tryna find other no risk xD
Cause I found an other one but was pretty risky sometimes...
Think I will use Shiro
T'y for answers
nekos.life gives minor's nsfw image so stay away from it
also you can make your own
Log in on their website, post your bot and wait for it to get approved (or denied if you don't follow the rules)
hey guys
i have this text file. i wan't a command to add a message to this text file. How would i do that?
like !add (message)
and it will get on place number1
annd !add (message) will get to message 2 etc etc.
Get the argument string, read the file, check for a number that is empty and write the string to that line
How do I check if my bot is in a voice channel ?
Like ```js
let VC = message.guild.me.voice.channel;
Should this work ?
Does it work?
idk
Try it? :)
This might be of help
https://stackoverflow.com/questions/55089293/how-to-locate-the-voice-chat-that-the-discord-bot-is-connected-to
then check if voiceChannel.members contains your bot
guys how do I add or remove something from a json array? (discord.js)
context: I'm trying to make a cooldown per user for each server that the server is in.
myArray.remove(myArray.indexOf(thingYouWantToRemove));
thank you :3
pls help
People probably won't help you make an entire command, this channel is for more specific problems. Not just "how to make this command?"
But this might help you
https://stackoverflow.com/questions/59594196/how-to-make-a-invites-command-discord-js
yea ik that i am asking if anyone can show me some docs or vids for it
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://npm.community
Any other npm package I tried installing worked fine, but discord.js doesnt work for some reason...
why?
nodejs version ?
v12.19.0
@stable eagle I’ve tried dosent work neither
Works for me.
Does my code work for you?
Is this now how you add an image to a buffer in discord.js, it's not adding the file, no errors either 
obj.image = {url: "attachment://board.png"};
obj.files = [
new MessageAttachment(this.board.getBuffer(), "board.png")
];
where obj is an embed object
nvm I got it
can i parse a string to an array
e.g the string is in the format of an array but its a string
JSON.parse
Is it not possible to change it to a json string?
it is but that makes it into a literal json string and not an array
hi, I got a bot which deletes messages when a user is in offline status. But I have a problem. Idk why the bot doesn't work after a moment but only on 1 server... Does anyone have an idea ?
The owner must kick the bot and invite it back because when I restart it, It doesn't work too
Does it give any error messages?
How many guilds is the bot in?
If you don't want to use JSON.parse then you'll have to manually parse it which will be quite difficult if the array can include arrays and objects. How do you turn the array to a string?
im passing it from frontend to backend
59
I'll do that 
Could you send the part of the code that is supposed to delete the messages?
and it doesn't work in only 1 server. And I can look at the perms, it has all perms it needs
try:
statut = user.status
if statut is discord.Status.offline:
db = sqlite3.connect("main.sqlite")
cursor = db.cursor()
cursor.execute(f"SELECT bypassrole FROM main WHERE guild_id = {message.guild.id}")
bpresult = cursor.fetchone()
if bpresult is None:
pass
else:
try:
if get(user.roles, id = int(str(bpresult[0]))):
return
except ValueError:
pass
if userid == int(341257685901246466):
return
elif user.guild_permissions.administrator:
return
elif get(user.roles, name = "AllowUnconnected"):
return
elif user.bot:
return
else:
cursor.execute(f"SELECT logchannel FROM main WHERE guild_id = {message.guild.id}")
logresult = cursor.fetchone()
await message.delete()
if logresult is not None :
await client.get_channel(int(logresult[0])).send(embed = embedtypingperso)
try:
await message.author.send(embed = embedtyping)
except discord.Forbidden:
pass
await creator.send(embed = embedtypingperso)
print (f"\nTYPING\nGuildname = {guildname}\nChannel name = #{channelname}\nUser = {user} / {userid}\nDate infos = {infojour}")
except AttributeError:
return
@pure lion string.split(/,+ */); should split the array like string to an array
Try printing the value of user to see if it actually finds the user
but its a 2d array of objects so its h
@dusky sundial yes it finds it, but not on their server. On mine and all others, it works, but it stops working on their server
Do you have intents?
yeah
Hmm
@pure lion well Array.from(str);?
maybe that would work
or literally just eval the string
🧠
It works in on_member_state_update event, but not in on_message event on their server @dusky sundial
why parse and stringify it yourself when you can use JSON.parse & JSON.stringify
JSON.stringify on frontend, JSON.parse on backend, that's literally the point of those two
It seems kinda strange that it only fails on their server. Are you sure the bot has perms to read and delete messages in the text channel?
yeah it has all perms
could you give an example?
@dusky sundial
How to find a bot owner with the bot id
@earnest phoenix send dm real quick
Alr
that shouldnt even work, db is not defined
``could anyone help me on how i can implement a command like this: have this text file. i wan't a command to add a message to this text file. How would i do that?
like !add (message)
and it will get on place number1
annd !add (message) will get to message 2 etc etc.
why not use a database
Don't use f-strings with sqlite3
@slender thistle but I have to, because I need to search the guild id
use prepared statements
My bot rn is in 60 servers does it depend link one guy owns 5-7 of them)
Will it make a difference?
At 75 servers it starts right? @quartz kindle
yes
Hm I need 15 more
How to make a bot create a category?
no it's 76
wdym
there is no wdym, the category that channels go into
help?
can express send text as a download in a named file (e.g send the string a in the file a.cgp)
set content type to octet stream
reading docs
?
wdym you edited a package? how did you edit it?
Is there a problem with the api?
missing access means your bot cannot access something
for example a message in a channel with no view_channel permission
It may be from a server where the BOT is located.
any of the servers yes
anyone?
@zenith terrace ty
i download a gw package then went to the package code and edit little
when i restarted my bot there is no changes
idk if it is because of that
that's the case
i can't find it in the discord.js docs
are you serious
i read it all like 5 times
i can't find how to make a bot create the category
oh
@quartz kindle
ok thanks
what changes did you make, can you show?
but it's about creating a channel
options.type
categories are channels
oh are they
yeah
changed the embed color and the reaction
but it did not change
🎫
I am trying to remove all reaction from a message using message.reactions.removeAll().then(***) but getting error UnhandledPromiseRejectionWarning: TypeError: message.reactions.removeAll is not a function . It does says removeAll() is a method in guid though.
do you use pm2?
no
your message.reactions may be wrong
the package is inside your bot's node_modules folder right?
Hello. When someone votes for my bot, I want them to send him a special congratulatory message. How can I do it?
use the top.gg api #topgg-api
can I put long code here?
better in a hastebin or pastebin
make sure you changed the right things and not the wrong things
start a new cmd window in your bot's folder and run node
in node's interactive command line try requiring the module then console.logging the function you edited as a string
something like let g = require("discord-giveaway"); console.log(g.someFunctionHere.toString())
ThunderX
and see if the functions stringified code shows the changes you made
where ı vote bot
if(this.topClans.length < 1) return;
message.react('▶️')
const reactCollector = message.createReactionCollector(
(reaction, user) => ['◀️', '▶️'].includes(reaction.emoji.name) && user.id === author.id,
{ time: 600000 }
)
let currentIndex = 0;
reactCollector.on('collect', reaction => {
console.log(Object.keys(message.reactions));
message.reactions.removeAll().then(async () => {
reaction.emoji.name === '◀️' ? currentIndex -= 1 : currentIndex += 1
message.edit(this.generateEmbed(currentIndex))
if(currentIndex !== 0) await message.react('◀️')
if(currentIndex < this.topClans.length) message.react('▶️')
})
})
})```
In this code, I am getting error that TypeError: message.reactions.removeAll is not a function...
message.reaction.remove('🎫') will remove the \🎫 reaction from the message?
well message.reactions.removeAll is not a function
There's no message.reaction
to remove a reaction you have to get the reaction and then call the remove method on it
message.reactions.cache.get("emoji")?.remove() for example
i saw this
to remove all reactions from a message, i want to remove all reactions from the message i sent, On collection the reaction
are you on v12
no 11.6.4
update then
ok
in v11 there's message.clearReactions()
♥️ ty
Lol
https://this-is-a-really.questionable.link/9GEUmx how am I getting cloudflare'd on my localhost
im confused
Which Discord Bot should I make?
Need Idea
No Music Bot
TypeError: Class constructor handling cannot be invoked without 'new'
``` whats the meaning of the error?
Try reading it again
and whats the error?
Are you using typescript or babel? @tired panther
node js lol @cinder patio
people still use v11?
There's a lot of people still using v11 and don't know what's gonna happen to it 
So uuh
How to make the bot remove your reaction once you react on it?
reaction.remove() doesn't seem to work..
await e.awaitReactions((reaction, user) => reaction.emoji.name === '🎫')
.then(collected => {
reaction.remove()
})
all correct?
where do you define reaction?
first line
That defines it only for the function it's used in because it's a function argument
collected is a collection with all reactions that got collected. You could get the first reaction from the collection and call the .remove method on it
so
await e.awaitReactions((reaction, user) => reaction.emoji.name === '🎫')
reaction.remove()
.then(collected => {
})```?
or wait no
reaction.remove()
await e.awaitReactions((reaction, user) => reaction.emoji.name === '🎫')
.then(collected => {
})```
all good?
no? How is that supposed to fix anything, you're just moving reaction.remove()
i thought the problem is in moving the reaction.remove()
How did you get that from what I said #development message
collected.first().reaction.remove()?
try it
hint: collected.first() is already of type MessageReaction
so just .remove()
my bot hitted 76 servers damn op
v11 gonna go kapoof soon
Hi, I know it isn't about discord or dblpy, but I am in programming class, and I got a problem.
Here is my code, and Idk why my code keep the 0 at the end of the table. But the code below says it doesn't keep it... Can anyone help me ?
cout << "Entrez votre valeur numero " << Indice+1 << " du tableau : ";
cin >> Valeur;
while (Valeur != 0 && Indice < 25)
{
if (Valeur != 0)
{
Tableau[Indice] = Valeur;
Indice++;
}
cout << "Entrez votre valeur numero " << Indice+1 << " du tableau : ";
cin >> Valeur;
}
glitch.com error
READY undefineduser, undefined channels, undefinedservers , done.
Not a glitch error. Just your code having bugs.
let member = message.guild.members.cache.get("759508632626528308")
if (member.kickable) {
guild.members.kick(member,{reson:`delete 10 channel`})
} else {
console.log("hello")
}
Error in kickable
Doesn't cin >> T return a string, or is it able to convert it to an int? I haven't used C++ in so long and only know the basics
How?
take a guess
for ts, I want to store an array of Child classes of a parent class. What type should I define for the array?
I don't now about fetch
fetch message
it depends of the table. If it is a char, you will be able to put char, and if it is int, you will be able to put numbers
i don't understand what you mean by this
So let's say the parent class is Parent. Is the child class technically the same as Parent?
I say how i can fetch message
yes, I'm having a bunch of child classes of the Parent class.
And I want to store the child classes (not instances) to an array
// I know doing Parent[] won't work, but u get the idea
const Child_Classes: Parent[] = [Child_Class_1, Child_Class_2];
let member = message.guild.members.cache.get("759508632626528308")
if (member.kickable) {
guild.members.kick(member,{reson:`delete 10 channel`})
} else {
console.log("hello")
}```
Why i have Error in kickable
can someone help me?
No one can help until you ask a question
yha only one sec
Are you stupid?
Hey don't insult people
if you can't help them, don't reply
how can i make an embed change page with reactions?
Why??
I'm going to help him now
Show some respect
You were told exactly what to do
How about you show some respect and don't call people stupid first?
The hell is wrong with you
How about you keep your mouth shut? I'm trying to help someone here
And you're getting in the way of that
No need to be rude here
Members can be uncached, you would need to make sure you fetch the user first
Don't call people stupid, simple as that
await guild.members.fetch("759508632626528308") should do the trick
You'd need to use some sort of reaction collector. How to do it depends on the programming language you use, and your library.
Thank you

Thank you too
@solemn jolt
// This will always work, but remember member can be null sometimes, if the id is not correct.
const member = await <Guild>.members.fetch("759508632626528308");
Yes thank you for spoon feeding him the code now he will use it without understanding
This is outrageous
this is allowed right?
yes
ok
wdym with library?
like... what are you importing at the top to use discord
library, module, import, whatever your language uses for "external stuff you get to help using the discord API"
@umbral zealot I need your help with my bot actually
Or maybe just ask your question and someone will answer.
No I want you
You cannot demand my help, kid. Ask your question, if I can help I will.
any idea about this
my bot exploded in popularity today
How much?
No I'm not, I'm a bot reviewer, I am absolutely not obligated to help you.
3k users 30 servers
That's nothing
evie?
Inorganic means that you have one or more people that own too many of the guilds your bot is on
After @umbral zealot helps me with my bot, It will have a million users
🗿 This chat is currently a certified bruh moment
Or, tbh, I can just block you.
it is not a bot reviewers job to help you with your bot
Stop
so how tfix that
My bot depends on you
no it doesnt
I actually need someone to write it for me because I'm not that good at programming
so I came here looking for someone
and I think Evie is the guy
Use code to check who owns what guilds, and leave guilds owned by a whole lot of peopel.
that doesnt mean they are obligated to help you 
"Evie is the guy" ok you're definitely a troll.
Or a moron, your pick
Either way, blocked.
why not both Evie?
Probably both yeah
or you could of taken the hint knowing they wouldnt of helped but you kept saying you needed them 
If I was a good programmer I would help anyone write their bot
I guess some people aren't that kind
It's funny when people act like assholes and then expect something like respect in return
Stop being a damn Karen.
"You're obligated to help me"
"My bot depends on you"
"I need someone to write my bot for me"
Complains about spoon-feeding
Makes absolute sense
I thought you blocked me? I guess you changed your mind
I'll DM you the bot details
So rude loool
you do know Evie can still read blocked messages 
🗿 What do you expect for saying "You're obligated to help me"
^
Ok sorry
I apologize
Can you help me now?
Ah yes, 2 words will change their mind surely

I didn't want it to come to this but I will pay you
I dooo
r/choosingbeggars
I offer my help for free for those who ask and are deserving 😄
I need help getting hugs from someone named Evie
🗿 Loggers bro
I asked you and I think I'm deserving
i AM deserving
that's an undeniable fact

laugh at me all u want
idk if this is now meming or being entitled af
im gonna go ask somewhere else
When you ask, be gentle, and don't beg someone for their help, saying "you're obligated to help me" already means you don't deserve it
Since I'm not fluent in C++, I tried writing the same program in Python. The if (Valeur != 0) {...} is redundant since you're already checking it in the while condition, but C++ may play differently with loops (run before check vs. check before run)
Program: https://hatebin.com/wbqvdqffqu
Output: https://hatebin.com/fvinphbzqp
A 0 key is at the front of the array because index starts from 0 and is incremented for each time the while loop is run. If I wanted to change it, I could start index with 1 instead.
Is this helpful, or am I off?
Clowning karen boss level
Please keep in mind that the world does not revolve around you. We're willing to help if you ask appropriately.
Pure Karen vibes.
if value != 0:
will never be true
because you just checked against that in your while loop condition
Use your head
What?
there he goes again insulting people

I mentioned this:
The if (Valeur != 0) {...} is redundant since you're already checking it in the while condition, but C++ may play differently with loops (run before check vs. check before run)
@sudden geyser hey, do u got any idea for this?
Stop spreading lies
I am just helping him (something you refuse to do)
He's not lying.
dude really said for someone to use their head but couldnt use their own when evie rejected helping him 🗿
You can be helpful and still be insulting at the same time.
Y'all really need to get the contextual cue that my name is "Evie"
Use your head
Yes
🗿 Ah yes, misinformation is really helpful isn't it, "if value != 0:", "will never be true"
Voltrex you're just hating at this point
Please don't let your anger blind you
Alright can we please just stop feeding this troll
Wtf is this guy talking about
Karen level boss
I don't even want Evie's help anymore so can we just get past that
just let him flail around, he'll eventually get tired.
This is dev, never seen people not feed the troll.
oAuth
Use the logical NOT operator
Caching the entire member list to filter out some bots is expensive.
That's a thing that's not very useful to be honest and you can't do it without the GUILD_MEMBERS intents
That also only gets people in cache
you could get the guilds with oauth then make API calls with the guild ID to get the members
did you have Build tools installed?
Read their troubleshooting page
👀
npm i -g --add-python-to-path --vs2015 --production windows-build-tools in an ADMIN command prompt
oh man if only the error messages said something helpful!
pretty sure node-gyp supports vs2017 now
Also sqlite3 is literally the worst sqlite module
no need to specifically install vs2015
2017 is supported
TIM
Hi tim
I dunno man as long as it works I'm not messing with that command 😂
what should I do exactly?
also add python to path is on by default im pretty sure
read what I Said
why someone called this channel meme lel
run that command in an admin prompt
but he said it supports vs 2017
JavaScript developers at work lol
doesn't matter
What a mess
it's gonna work anyway
If it were only that simple
it has to be run from an admin powershell
trust me I've been dealing with sqlite for 4 years, it's rarely that simple
@quartz kindle hows that tim.sex domain 
🗿 Woah
I will try this 🙂
e__E
well i never had any problems with it xD
wth
lmao
Tim vs Evie 
I mean... flexing on my creds here, but 1.5 million downloads for enmap means I pretty much know this install method works a whole lot better than just instlaling the build tools alone
Hmm, is that the new alias domain for a horny site or something
Please, trust me on this one 😄
Interesting
enmap is nice, until you realize that it stores everything in memory and it uses already 1GB
not distrusting you lol you're right that there are many edge cases and people's pcs are extremely messy
Thus, JOSH does not cache data. 😄
but it most cases under normal circumstances and in a normal machine, the build-tools command alone should work
You're right there's edge cases, which the whole thing I use covers, like up to 99.9%
used enmap when i started with bots, until my VPS ran out of ram
so i usually ask them to try the normal way first
and if it doesnt work, then try something more specific
I had to write this https://enmap.evie.dev/install#pre-requisites just to be sure to try to cover all cases
the only thing that breaks nowadays is people with weird unicode folder names
i still think its funny that people ask stuff here that ive also ran into and googled it for 2 hours and found 6 Stackoverflow pages that where somewhere between 2-8 years old
sure its slower but you learn something in the process
you might wanna add WAIT UNTIL IT SAYS "ALL DONE"
the amount of people who close cmd/ps after running the command or after python is installed is absurd
xD
expect people reading the page are donkeys
people dont even bother reading these days
they just scan a website for code blocks and copy them
like you have to design software already in a way a 3 years old could use it otherwise some people will start complaining bcs they dont read stuff
I've learned to just deal with it tbh
people occasionally join my support server and ask questions clearly answered in the docs and I let them know it's clearly written in the docs
ye thats annoying
still error
make it simple, minimize codeblocks and to maximize them you have to answer a simple question where the answer is in the text above
I tried this
It can take a while
okey
And yes I know it's not necessary
did you wait for it to finish installing?
yes
does anyone know how to make the bots activity be watching and the amount of servers its in?
discord.js
isn't it end?
no
no that's not done
you have to wait until it says "ALL DONE"

yes sir
can u help me please?
I'm busy right now
-_-
Such a useless interaction.
ikr
@earnest phoenix
https://discordjs.guide/popular-topics/faq.html#how-do-i-set-my-status-to-watching-or-listening-to
thank you
also client.guilds.cache.size
was about to post that, hehehe.
problem
someone should make a bot that posts matching docs/guides to basic coding questions in here
how do i make it detect the amt of servers its in tho
<client>.user.setActivity('<activity>', { type: 'WATCHING' });
that doesnt do much
sounds stupid but it could help users that get overlooked if a lot of traffic is in here
already answered: client.guilds.cache.size
the discord.js server's bot has commands for their entire docs
these guys don't wanna help anyone write a bot so good luck with that
so where do i put that in
<client>.user.setActivity('<activity>', { type: 'WATCHING' });
yeah but why stop at discord.js we'd need commands for every single library and every single programming language docs, right? lol
lol i could do it myself
Can you help me write my bot too?
At this point it's just putting strings together, that's basic javascript.
depends, i prefer a non toxic work enviroment
yeah me too
also im currently quite busy with work
If you're so busy then why are you wasting time chatting on Discord?
I don't appreciate your lies
bcs im done and want some human interaction?
LOL
depends
Ok depends on what
what did you have in mind?
Maybe one day this guy's actually going to ask a programming question, who knows? We're all hoping for that.
Evie I have replaced you
with some luck, maybe, just maybe
You have to move on
oh wow
1 sec
Good freakin' riddance I say.
This is why white names are superior to green names
lol Lime Green is superior to Green
anyway when are they going to be muted
and lime Green is superior to white
there are two types of white names
I'm not breaking any rules so never
I just came here for help like everyone else
Don't play dumb.



much?