#development
1 messages · Page 1066 of 1
Huh
Not found?
yep
Wth
i think it doesnt find the role?
{"message": "405: Method Not Allowed", "code": 0}
Open that link
U will find this lol
Maybe permissions error?
you got that because you're trying to hit an api endpoint from your browser @jolly quail
there's no token in the auth headers
Hmm
See the url
It found the member?
And the role too?
So i guess right http request was made?
or ur libs
Discord api
im not sure tho
hmmm
Didn't discord api shift?
Hmm
404 - Not Found : PUT https://discordapp.com/api/v7/guilds/719486191535390780/members/732204169959702600/roles/731180560256466944
@jaunty junco
our CDN domain will not be migrated and will remain cdn.discordapp.com for the foreseeable future
At least this seems right..
yes cdn domain
v7 api?
api did move to discord.com
Ikr
i thought max was v6 still
so then
🤔
hmmm
so then i should wait for an update on discordia?
i thought max was v6 still
@solemn latch nah, discord.js uses v7 too
Yep
but it doesnt exists in reality or smth
yes
yea
and v7?
if official libs has been told to use v7 or smth
d.js v12 uses v7, d.js v11 and below use v6
eris uses v6
It took so long for discord to add bot features that slack had for so long lmao
oh wait, i think eris uses v7
because ~~ i cant log into user accoutns~~ someone i know cant log into user accoutns
is v6 gonna be deprecated?
How do I make this command section thing go all the way to there
on the div?
Margin left ya
the child
float:right works?
Wait no
I don't wanna move it to there
The div needs to go untill there
Like that
oh right
I have to go eat now so @me then I can scroll back up
What's wrong?
It's not a function
you did upgrade from v11 to v12?
Hmm
Are you using Discord.js v11 or v12
no @restive furnace
How to upgrade work to V12
ya
Is there an explanation on YouTube?
There's a list of changes you can find here: https://discordjs.guide/additional-info/changes-in-v12.html
use let or const
@digital ibex why though
2 reasons, 1. its deprecated and let and const do exactly what var does
var gay
its basically useless
it is
var is not deprecated.
basically
The end result is let and const are typically more safer. An article can explain this quite better than I: https://www.freecodecamp.org/news/var-let-and-const-whats-the-difference/
yes
it's just due to scoping rules
lol
it's on you for being dumb and not understanding scoping
var is still usable
i understand scopes 
@jolly quail width: 100%
i've never used it once
How to move a bot
Where did u give width:100%
is anyone using the npm package ytdl-core-discord ?
You can't even imagine
or the normal ytdl-core
No this is width:100%
try 150%
exactly which element to add that css to..
I'll play with it
Anyone help me too 😭
Lol np
you could just do fill-available for width
tip
how do i make that the bot type what i sayed. like say command?
use units relative to the thing you're resizing
how do i make that the bot type what i sayed. like say command?
how do i make that the bot type what i sayed. like say command?
@stiff stream that's basic..
tell me
remove your command from the message content and send the new manipulated string
Ya
Get the message content and send tht to that channel
@jolly quail how? im new
Js?
Lol
ok you dont need t ohelp
Hint: substring
Anyone help
where caan i host a bot?
wait
aws, google cloud, azure, galaxy gate, contabo @wicked juniper
How to host a bot on Google cloud ? Pls tell I am currenyl hosting on glitch but it sucks
message.channel.send(`${argsresult},`)```
i need to change the args.join to something right?
@delicate shore google has tutorials
message.channel.send(`${argsresult},`)``` i need to change the args.join to something right?
?????????
yes
Ron, if you’re making a say command:
<message>.content.substring(length of your prefix, command length, and + 1 for the space after the command)
Oo
message.channel.send(message.content.substring(prefix.length+command.name.length))
Something like that won't work?
just the prefix length? 🥴
and + 1
Not entirely sure tbh
Lol
Better to just have the +1 lol
Just try it
i know i need to change the args.join to something
Do you have args defined?
yes
@stiff stream if you use discord.js, heres you in-depth tutorial: https://discordjs.guide, not saying other libraries have bad docs tho
It isn't working?
What do u wanna add
Bruh
Wth
Ur using assignment operator inside addField
I never tried that lol
ron announcement is the command
U added title to announcement..
Ok
i dont want it to say announcement in the field
this looks trash how to make it look and run better as it is weird like i want to set custom number for buy
use eslint
Derku
eslint?
or beautify your code
oh i see what you mean
I honestly hate eslint lol
@stiff stream done?
u can configure it to what u want, noah
i like it since it makes code look better and removes unnecessary stuff
u can configure it to what u want, noah
yh using rules
I’m aware of what it can do
this looks trash how to make it look and run better as it is weird like i want to set custom number for buy
@earnest phoenix okay wdym btw, elaborate
i dont use it because i cant even be bothered
@stiff stream done?
@jolly quail
not how u use .slice
@earnest phoenix okay wdym btw, elaborate
@earnest phoenix like ik it can be better and its weird code like confusing it doesnt look liek a pro did it i want a shop liek dank memer ya know like can set custom price ect.
No no
args.join(" ").slice()
@jolly quail
yes i see
@earnest phoenix like ik it can be better and its weird code like confusing it doesnt look liek a pro did it i want a shop liek dank memer ya know like can set custom price ect.
@earnest phoenix oh like guild settings for prices?
don't need linting when it's all going to be minified in prod 
@earnest phoenix oh like guild settings for prices?
@earnest phoenix im not sure tbh like uhh kinda hard to explain
i mostly use eslint just for indentation
Custom price requires a database for guild
@jolly quail
i mostly indent myself
still says announcement in there
@stiff stream what do you want it to say?
?
message.channel.send(new Discord.MessageEmbed().setTitle("**__Announcement__**").setColor("FF0101").addField("Announcment:", message.content.substring(prefix.length + 13))```
avoid spoonfeeding
Lol
@jolly quail nope
Just better to do substring if you’re not using individual arguments
Hmm
im actually wondering the performance in substring vs array join
substring internally has to use arrays anyways
@jolly quail
And the code?
strings internally are arrays
How's that possible
Bruh
cpp strings are fun
yes
so slice[1]?
what's args defined as @stiff stream
How you defined args ?
it did remove first
Ron I gave you code 
Ron I gave you code
@forest mirage xD
How you defined args
Ron I gave you code
Noah gave perfect code but idk what happened
@forest mirage ty

probably args[0] is nothing
He didn’t use it

god knows what the fuck they're doing this is a result of hotgluing code from different sources together lol
Poor noah xD
How many stack overflow tabs do you think they have open?
How to shift from glitch to Google cloud
Wth
i wonder why you want to do like that?
cuz why not
its just gonna get declinef for something like useless info
@forest mirage ty, its works great. just change the (prefix.length + 13)) to (PREFIX.length + 13))
its just gonna get declinef for something like useless info
@digital ibex uhh
you defined prefix as PREFIX? lol
He doesn't know all of ur code :p @stiff stream
you need to provide useful information, hayper.
something like this: "long description on your bot's page is filled out with spam/junk to reach the 300 character minimum requirement. Please rewrite your description to include more useful information about your bot."
yeah, it is
Ight
i think so anyways
i ctrl v ctrl p from my github page lol
nice
my creativity died
That's why there's
How to host? section
Ah nvm i will delete it
Wouldn't it be funny if you could somehow make a bot in scratch
I was reading over the requirements to add a bot to the server list, and I noticed they said the bot would be tested with "permissions=0".
Now i get that they mean to say the bot will be tested with no permissions, but what I'm not quiet sure of, is what they expect the bot to do when it has no permissions? Do they expect the bot to DM the owner of the server?
If anyone could help clear this up for me, I would be very grateful. :)
i need help how to show the server logo with a command
"if your bot is more then in 75 guilds" did they lower it? It used to be 100 right?
i need help how to show the server logo with a command
@north hollow well just search message.guild for it's pic i guess?
It has not changed
Their message can be a bit confusing, but what they mean is: If your bot is in 75 guilds, you can begin your verification process, but it isn't required until you hit 100.
@north hollow well just search message.guild for it's pic i guess?
@jolly quail ok
How do you list all servers your bot is in With discord.js
<client>.guilds.cache.map(guild => guild.name).join(however you want to join it)
Wouldn't it be funny if you could somehow make a bot in scratch
@pure lion i can
but its not fun :c
i like to make GUI applications :c bcs they fun
📜🔤client/client.🍇🔤
🏁🍇
🔤confidential🔤 ➡️ token
🆕🔌🆕token❗️ ➡️ client
💞client 🔤message🔤 🍇msg_⚪️
🍺🔲msg_ 🖊 ➡️ msg
↪️🎼💬msg❓ 🔤.echo🔤❗️ 🍇
🔈client 🏠msg❓ 🔪💬msg❓ 5 📐💬msg❓❗❗️❗️
🍉
🍉❗️
🏃client❗️
🍉
Hi is there a faster way to use emojis
....???
oh
whats this library called?
Its World Emoji Day so I wanted to celebrate and try it out
but whats the library called so i can probably help out 🙂
https://determined-roentgen-236172.netlify.app/
is the documentation. Im pretty sure its no longer updated but I wanted to see myself turn on a bot using this lol
LOL
wow
@tired nimbus have u tried Windows key + .?
oh wow I never knew that existed
lol np
whoa
ikr
(☞゚ヮ゚)☞
Hi is there a faster way to use emojis
He's speaking the language of Gods.
Hahaha my exact thoughts when that window popped up
holy
cow
Starman, if you're still reading chat, could you help me with my previous question? :3
i need help how to show the server logo with a command
Like in making a bot to do that or?
i need help how to show the server logo with a command
@north hollowguild.avatarig
icon lol
@north hollow waht language
js v12.2.0
I was reading over the requirements to add a bot to the server list, and I noticed they said the bot would be tested with "permissions=0".
Now i get that they mean to say the bot will be tested with no permissions, but what I'm not quiet sure of, is what they expect the bot to do when it has no permissions? Do they expect the bot to DM the owner of the server?
If anyone could help clear this up for me, I would be very grateful. :)
@dreamy heron we give bots basic/required permissions such as sending embeds, etc.
:l
Oh okay good. Thank you.
I was just thinking like, if it cant read a channel, how would i know what it wants? xD
So helpful <3
lmao
I thought it was guild.icon
guild.iconURL()
So I'm here again, learning more about scripting as i'm trying to figure out how to make a mute command, this is the script I have now, but whenever I try to run the command which goes as next $mute (@'d player) 10s or 10h etc
but the bot just yeets itself of the mountain and I get this
and then it just shuts of
so any java scripters any idea on how to help me?
@white stone discordjs v11 or 12?
12.2.0
managers 
case 'mute':
let person = message.guild.members.cache.get(message.mentions.users.first().id || args[0]);
change that
2nd
uhh
let mainrole = message.guild.roles.cache.find(role => role.name == "Roleplayers");
let muterole = message.guild.roles.cache.find(role => role.name == "Mute");
use that
ty
also
if(!args[1] || isNaN(Number(args[1]))){
//return an error
}
use [1] because its zero-indexed
k I will
person.roles.add(muterole, "reason").catch(console.error);
person.roles.remove(mainrole, "reason").catch(console.error);
I'm using V12
wtf
message.channel.send(person.user.toString() + " has been muted for " + time);
explain myself I'm learning to code
or just use `${person} has been muted for ${time}`
?
in other words
its suprising your code worked at all
there are so many errors...
please read docs
read that
just sit down
for an hour
and read it
it will make your life much easier
and others too tbh
Please don't just follow https://discordjs.guide
it does not explain things well
please read the docs
Do it daddy
fish wtf
say it in a not horny way
thats not what she said
idre = re.compile(r"([a-zA-Z0-9]{22})$")
try:
match = re.search(idre, key_album)[0]
except:
match = None
if match:
res = ('exact', await bot.sp_client.get_track(match))
else:
res = ('search', await bot.sp_client.search(key_album, type_="album", limit=1))
if res[0] == 'exact' and not res[1] or res[0] == 'search' and len(res[1]['albums']['items']) < 1:
em.set_author(name="Sorry.", icon_url=bot.img)
em.description = "No album was found from your search."
return await ctx.send(embed=em)
key_album = res[1]['albums']['items'][0] if res[0] == 'search' else res[1]
wtf github
Isn't it find_all or something for re
What's an example id bte
the typical spotify id looks like 1R6vbGGXSEZZmTGn7ewwRL
@trim saddle remove the $
...
$ means end of text I believe
what does {22} mean? length?
how many times to match
specifically that ^
matches the preceding token that many times
you can also define ranges
{x,y} I believe
I have 1 chrome tab open how is this eating through my fucking ram
because its chrome
@modest maple so i figured out how to test without restarting or using the beta
reloading on one cluster and fucking about 5k guilds 
whejre is the python help channel lol
there isnt one
Here
🙃
i can post code here for assistance?
If you describe your issue, yes
Ok.
oh shit
why though
because hey guys yes guys bye guys
Stop
.command-name-column::before {
content: '';
position: absolute;
top: 50%;
left: -17px;
transform: translateY(-50%);
width: 20px;
height: 20px;
background-image: url('/assets/img/right-arrow.svg');
background-position: center;
background-size: contain;
background-repeat: no-repeat;
transition: all .4s ease;
}
Any idea why this isn't adding a right arrow to the front of the command-name-column
because my bot is still not approved
@slender thistle can i know when my bot is going to be approved?
3+ weeks since submission date
what about image @slender thistle ?? or does that change automatic
wait is my bot in this server?
avatar (bytes) – A bytes-like object representing the image to upload. Could be None to denote no avatar.
how did it manage to ping it then
@earnest phoenix Did you ignore my last message
For help with coding
that should be #topgg-api
Read the channel topic there
okden
avatar_url_as(*, format=None, static_format='webp', size=1024) so... im guessing add source in there
Can anyone help me add a header to my website/nav bar
for second in range(60):
message_id = await message.channel.fetch_message(message.id)
for reaction in message_id.reactions:
thumbs_up_count = 0
thumbs_down_count = 0
if str(reaction.emoji) == '👍':
thumbs_up_count = reaction.emoji.count
if str(reaction.emoji) == '👎':
thumbs_down_count = reaction.emoji.count
await message.edit(content=("**----POLL----** \n \n**Green Today?** :thumbsup: {} \n \n**Red Today?** :thumbsdown: {}".format(thumbs_up_count,thumbs_down_count)))
await asyncio.sleep(3)
Here is my code, it makes a poll right, and when people react with the thumbs up or down it tries to count how many did thumbs up, and how many did thumbs down. then displays the number by constantly editing the message. the code sucks, but I'm not seeing the logical error but it is there.
yours are having voice problens with discordjs?
Can anyone help me add a header to my website/nav bar
cant you just use the developer portal to change the avatar ? @crystal bison
i imagine this is the wrong server for discord bots. my bad.
@hearty wind You are resetting the count on each iteration
yes it goes back to 0 but does it not change to the number in thumbs_up_count = reaction.emoji.count to display the count?
like it does go to 0 but it changes imemdiately after in the if statement? or no?
hmm
Can anyone help me add a header to my website/nav bar
@earnest phoenix uhm dont you think that is the basic as hell stuff in html?
also yes the code is very bad and spammy lol.
put the
thumbs_up_count = 0
thumbs_down_count = 0
outside of the loop
ok let me try.
it is counting but every time the loop starts it resets to 0
ughhhh i didnt change it in bot option i just changed it in general info
lmao
I don't understand how to make a Bot right now I am making one and the thing keeps saying the boys client ID is invalid when it's not
Can I have some help making it
what error are you getting?
yey lol i blocked adverts and NSWF content awesome
Not Safe Work For
i need help how to make a ping command that show your ms
wdym by your
sorry but, someone help me with the voting command? I don't know how it does
:l
Text: sometext first:"something" second:"something else"
/(?<=:)[A-z]+|(?<=")[A-z ]+(?=")/
I want to grab both something and something else how can I do that?
?
start on :" and finish at :, use global so it doesnt return on first match
use \w greedy for something if its not only characters
@earnest phoenix hmmm you could use this btw
/(")(.)*?\1/gm
msg = message.content.toLoverCase();
if (message.author.bot) return;
mention = message.mentions.users.first();
if (msg.startsWith (prefix + "send")) {
if (mention == null) { return; }
message.delete();
mentionMessage = message.content.slice (8);
mention.sendMessage (mentionMessage);
message.channel.send ("done!");
}
Why error?
LoverCase?
Yeah?
lower
not LowerCase?
not lover
lmao
lmao
lovecase
Its still not working :/
everyone be warned this dude is a drama machine
he's been reported to discord, made false threats toward me.
@earnest phoenix Hello!
It is for your own safety
We no care
Ok??
he ip catches people
just dm a mod
no need to post shit here, just dm a mod and let them know
submitting to a mod rn
@earnest phoenix There's no need to bring it here if you already contacted a moderator
not in #development
I have every right to mute you for causing shit, especially in a wrong channel.
Yes but "fuck you" is happening like 24/7 lmao
Shivaco then it'd make you a rlly crappy human being
I have every right to mute you for causing shit, especially in a wrong channel.
@slender thistle lol mute him
bruh move this argument elsewhere
@opal plank Is it possible to see where it got that from
I am letting everyone know about him that he is dangerous
now that you know it's done
@earnest phoenix wdym?
Bro keep this channel on topic
Cool
cause i gtg


One more off-topic message in this channel and you are muted
thank you for understanding
@opal plank So you know how it is first:"something" how can I get the first, and the something
wait
is this kid trashtalking about me?
Stop right there
can any mod get to dm mme?
Either move to DMs or stop this drama
LOL
i literally just came here
lol
i dmed a mod just an fyi and it's been taken care of
I actually originally needed help
can you send them the recording of the "whole" chaat?
you two stop
I actually originally needed help
@earnest phoenix Whatuafaq??????
I did
@autumn aspen show the error btw
@slender thistle Mute them lol
it's been delt with
haha
@autumn aspen I don't need to be told how to moderate
xD sorry then
How do u get people on ur server
Wrong channel to ask
msg = message.content.toLoverCase();
if (message.author.bot) return;
mention = message.mentions.users.first();
if (msg.startsWith (prefix + "send")) {
if (mention == null) { return; }
message.delete();
mentionMessage = message.content.slice (8);
mention.sendMessage (mentionMessage);
message.channel.send ("done!");
}
@opal plank
LoverCase still
I changed it to Lower'
show the error btw
Ok so erwin
@autumn aspen
What
Command
Here is the current text
sometext first:"something" second:"something else"
we grab "something" and "something else"
I need to know what came before it
in this case it's first and second
yeah, though it will fail if there are more than 2
That's the issue I was facing
the way i did it is to not return, its greedy
at wrapSafe (internal/modules/cjs/loader.js:1054:16)
at Module._compile (internal/modules/cjs/loader.js:1102:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47```
@opal plank
Do I need a command handler?
No one will give you a command code
Give me music command
@earnest phoenix No spoonfeed
Why
Spoonfeeding is not allowed in this server
🙁
Why
@earnest phoenix Read rules
So
@autumn aspen })
@opal plank oh ok
How I can get coomand
how do i make commands that are inside of switch statement case insensitive
@earnest phoenix Called making it, Like everyone else here has too.
How I can get coomand
@earnest phoenix dude search on YT or smth read the rules
?
switch (LoweredMessageContent)
depends, you only want 2 iterations?:
switch (LoweredMessageContent)
@slender thistle thx
I mean.. I can work with two
Not you
Sure
but ONLY two?
can it be one or smth
give me 2 examples if possible
-embed title:"some title" description:"desc" color:"RED"
so there are 3 there
ik
best case scenario
with /g on
I kind of have no idea how to work with regex so
@opal plank dude still wrong?
so it can be
this:"that"
d:"this", k:"foo", bar:"ok"
between 1 and N matches i assume
@autumn aspen show
yea
that regex i gave you should work for unlimited times
so it can be
this:"that"
d:"this", k:"foo", bar:"ok"
@opal plank huh?
$onlyIf[$getUserVar[Experience]>$getUserVar[Level XP];Você não tem experiência para elevar.]
$setUserVar[Experience;$sub[$getUserVar[Experience];$getUserVar[Level XP]]]
$setUserVar[Level XP;$sum[$getUserVar[Level XP];500]]
$setUserVar[Level;$sum[$getUserVar[Level];1]]
$deletecommand
$nomention
$color[$getUserVar[Theme]]
$title[Level Up!]
$description[Parabéns agora você upou para o Level $sum[$getUserVar[Level];1], seu próximo level precisa
it'll get anything between quotation marks
$onlyIf[$getUserVar[Experience]>$getUserVar[Level XP];Você não tem experiência para elevar.]
$setUserVar[Experience;$sub[$getUserVar[Experience];$getUserVar[Level XP]]]
$setUserVar[Level XP;$sum[$getUserVar[Level XP];500]]
$setUserVar[Level;$sum[$getUserVar[Level];1]]
$deletecommand
$nomention
$color[$getUserVar[Theme]]
$title[Level Up!]
$description[Parabéns agora você upou para o Level $sum[$getUserVar[Level];1], seu próximo level precisa
@earnest phoenix dude
@autumn aspen not you, alha
oh ok
😓
@earnest phoenix what EXACTLY are you trying to accomplish?
i see what you need, but that doesnt seem the right way to do it
specially cuz your example is with embed, which can be read instead of regex'd
why treat and embed like a string when its an object
I mean any way that I can establish same result
can anyone point me to way to count emoji reactions.
also, im assuming you on d.js right?
yep
if str(reaction.emoji) == '👍':
thumbs_up_count += reaction.emoji.count
if str(reaction.emoji) == '👎':
thumbs_down_count += reaction.emoji.count
this is not working.
oh its in python.
kk
not sure why that doesn't work.
\👍
Don't start library wars now
hahahha
xd
case "ping"
messsage.channel.send("pong")
break;
}```
case insensitive switch statement
uh
if anyone wants it
its works
alright, i just checked, this is what i mean @earnest phoenix
you can fetch the message and read its values directly
What?
@slender thistle what library is better inyouropinion
That doesnt make an embed tho
this is what i meant of instead of reading the embed as a string, read it as an object
im not doing that
then what exactly are you doing?
wait
its just only think I thought of
A custom one made by the developer in order to optimize resource usage
I found a very good VPS, 10/10 would recommend, https://mzunguhosting.ml/
hey thats advertisement
lmao, look at the page
let title, description, color;
string = '?embed title:"title" description:"desc" color:"color"'
// do some magic to get each thing and its value
message.channel.send(new MessageEmbed().setTitle(title).setDescription(description).setColor(color));
@vestal star it looks so bad
does this make stuff clearer
thats the bit that confuses me, why you using strings?
it even has a fake chat person
Consider it a message
It's supposed to be a message
from someone
in a channel
a command to make an embed, yes.
aight, we go from there then
thats quite easy
if you want to be spoonfed i can send you the code
but idk if thats allowed here
since they are separated by spaces, why not use split() and use args?
and then check with switchCase
@slender thistle how do i get the bot developer ro.e?
isnt necessarily going to have spaces
if you want to be spoonfed i can send you the code
@earnest phoenix Not allowed
Bot Developer role is given to you once your bot is approved
that's why I thought of regex :/
and can i know aproximately when that is going to be done :/ and are their chances of my bot getting declined and what are the requirements
?embed title:"title" description:"desc" color:"color"
?embedtitle:"title"description:"desc"color:"color"
1st space will always be there
for sanity i would recommend keeping the spaces, but lets see
others not necessarily
dont like that idea ngl
the regex is going to be super annoying to keep checking whats before AND after the :"
even if you manage to get everything out, you'll need what comes before the "
example
i do
if someone doesnt set a description, and you have it setting the title first, i'll set the title as the description
making a regex to capture everything before and after can be a bit slow
@nocturne valve
how slow?
@nocturne valve
how do i ping hi m
or go to his profiel
i still think a switch case there with startsWith would be a much better approach
STOP MISUSING THIS CHANNEL
LAST WARNING
If you want to test your stuff, use #commands
That's not coding
^
can i get answer to it? and ill stop
No
@nocturne valveokden
wow you guys are very lenient.
Just me
im a mod in a stock server with around 30k users, and he woulda been banned by now.
very lenient in here. im surprised.
Please keep this channel on topic
yes.
how is that lenient? are you dumb? i would have been banned just by using the wrong channel? no warn or nothing?
what kind of server is it
that has 30k members and doesnt know how to moderate
Ran out of chances
lol
let args = message.content.split(' ')
let embed = {}
for (a of args)
switch(a.toLowerCase()) {
case 'description':
embed.description = a.splice( description.length)
case 'title' :
//same thing
keep iterating
}```
@earnest phoenix
somethnig along those lines
In 7 october if your bot wont have 75 guild it will close is it true
Can we please read channel topics before asking our questions
Ok sorry
Man im never making any progress on this emoji reaction counter.
any advice to dumb it down?
i sent you a guide, did i not?
its python. and i read the docs. the logic is the problem. for me.
What's the issue, again?
it just needs to count the emojis and edit the message to show what the count is next to it. cause im using it for percentages.
Restricted to thumbsup and thumbsdown only?
yes. it only does it. ill show you a screenshot.
i just need the 2 to be next to the thumbs up and thumbs down.
How I add bot to discordgg
sigh
LOL
Oo
Starman you handle this please
i felt that sigh haha.
K
anyway. the algo just edits it non stop.
updating it. cause its being used as a percentage.
Send your code again please
Oh
message = await ctx.send("**----POLL----** \n \n**Green Today?** :thumbsup: \n \n**Red Today?** :thumbsdown:")
for emoji in ('👍', '👎'):
await message.add_reaction(emoji)
thumbs_up_count = 0
thumbs_down_count = 0
for second in range(60):
message_id = await message.channel.fetch_message(message.id)
for reaction in message_id.reactions:
if reaction.emoji == '👍':
thumbs_up_count = reaction.emoji.count
if reaction.emoji == '👍':
thumbs_up_count = reaction.emoji.count
await message.edit(content=("**----POLL----** \n \n**Green Today?** :thumbsup: {} \n \n**Red Today?** :thumbsdown: {}".format(thumbs_up_count,thumbs_down_count)))
await asyncio.sleep(3)
the built in method count is a new thing yesterday it was showing 0 so idk how the hell that changed lol.
You mean reaction.count
see it adds a thumbs up and down so people can decide immediately.
and i just need it to display what people chose next to it. which is shown in the edit message.
I'm not exactly sure what- oh wait .emoji is a string in your case
>>> "test test test YEEE".count("test")
3
yeah
Makes sense
Use reaction.count instead of reaction.emoji.count
Because your reaction.emoji is a string, you are trying to access a string object's count method
And you want to see how many times a reaction was used, correct?
how do i call "message" or "args" in function that i am module exporting?
const gifs = function(args, command){
args = message.content
.trim()
.split(/ +/g);
if(message.mentions.users.first() == undefined){
return message.channel.send("You didn't mention the user!")
}
if(args[3] != undefined){
return message.channel.send(`Incorrect useage! Please do ${prefix} ${command} [@user]`)
}
var userID = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0]));
var username = userID.user.username;
}
module.exports = {gifs};```
@slender thistle Yes that fixed the <object error> thing !!
Splendid
its still not the right count, but we moving in the right direction.
its some logic thing. i just need to understand async. stuff. i think.
if reaction.emoji == '👍':
thumbs_up_count = reaction.count
if reaction.emoji == '👍':
thumbs_up_count = reaction.count
See anything suspicious?
is count a thing?
Actually...
am sorry shiv but u have any idea on how to help me?
I assume that's what your code is like currently, @hearty wind?
yes
Nope, never spoke JS
okay
@client.command()
async def poll(ctx):
if str(ctx.author) == "penche#7432" or str(ctx.author) == "SWAGHETTI#7791" or str(ctx.author) == "Winter#7588":
message = await ctx.send("**----POLL----** \n \n**Green Today?** :thumbsup: \n \n**Red Today?** :thumbsdown:")
for emoji in ('👍', '👎'):
await message.add_reaction(emoji)
thumbs_up_count = 0
thumbs_down_count = 0
for second in range(60):
message_id = await message.channel.fetch_message(message.id)
for reaction in message_id.reactions:
if reaction.emoji == '👍':
thumbs_up_count = reaction.count
if reaction.emoji == '👍':
thumbs_up_count = reaction.count
await message.edit(content=("**----POLL----** \n \n**Green Today?** :thumbsup: {} \n \n**Red Today?** :thumbsdown: {}".format(thumbs_up_count,thumbs_down_count)))
await asyncio.sleep(3)
full method.
well if someone can help me please ping me
You excluded the thumbsdown emoji from your condition

You are only checking for the thumbsup
oh yeah i fixed that sorry


