#development
1 messages ยท Page 662 of 1
because my indent is 2, but it auto corrects to 4 and I get annoyed
Btw
xd
nekiono/eslint-config-raven for good eslint
@amber fractal what ide?
totally not mine
xD
I use vscode, I havent actually coded anything in like 2 months tho
i use atom
hmm
personally usually use sublime
just because it's lightning fast
unlimited free trial
@candid lynx what was your js question tho?
And I actually have a paid sublime license
do you prefer making classes with the function() method or the class method
that something with constructors
like this
ik what a class is lmao
class Food {
constructor(name) {
this.name = name;
}
getName() {
return this.name;
}
}
the class constructor was made to replace that method
es6 good
class constructor
most people's are
This is usually the same in all my bots now https://oliy.is-just-a.dev/tt4iy5_730.png
except it's client.config now
and not client.privates
but that doesnt really matter
@amber fractal why no EventHandler class
?
Can I give you an honest opinion
const cfg = require("./config.json");
const discord = require("discord.js");
const bot = new discord.Client({disableEveryone: true});
bot.on("ready", async () => {
console.log("Bot is online.");
});
bot.on("message", async message => {
if(message.author.bot) return;
if(message.channel.type === "dm") return;
let prefix = cfg.prefix;
let messageArray = message.content.split(" ");
let cmd = messageArray[0];
let args = messageArray.slice(1);
if(cmd === `${prefix}ping`) {
return message.channel.send("Pong!");
}
});
bot.login(cfg.token);
mines code is different
i have physical pain looking at either
@amber fractal can you run my eslint conf and count the amount of errors 
That's the ocd points I get
I'm jk; each to their own style
I normally dont make classes lol
Where is your eslint config?
eslintrc.json ?
small
.eslintrc
And you can just install it
See readme
https://oliy.is-just-a.dev/u0zqwi_731.png this is the config?
No this is custom conf for the bot

A fork of mine btw
I dont want to get your hopes up by telling you I'll run it, in which I probably wont 
Why is this so popular now??
c
.
on
(
'message'
,
async
function
(
{
author
:
{
id
}
,
member
:
{
guild
,
voice
:
{
channel
}
}
}
)
{
}
)
;```
because it's new
best code style
yes
wtf?
I agree
|| was the same with spoiler ||
Anyone who used md markdown before should know it though
It was never in discord before now
@inner jewel put all control chars on the right
no
Imagine coding with text aligned left
why would you do this
Yes
look at the brackets on the right
java is already mean
Javython
you made it look worse
java is chill
no its jython
pyvaโข
make it
pip install npm
uhmm
npm install gradle
npm install python

yes
then why pip install npm
youc temp = x; x = y; y = temp;
vs the guy she tells you not to worry about c x ^= y; y ^= x; x ^= y;
why have I never seen this
but then you allocate an array
But it's op af
xorswap ftw
Noone cares about resources in js
meanwhile i'm writing code for stuff with 20kb of ram total
Lmao
this is weird...
50 but 3 orders of magnitude greater
how large is node?

no irrelevant posting in here thx @candid lynx
ohh ok
at item.request.gen.end (/rbd/pnpm-volume/db1ffd3b-edf4-4166-8949-e213164599e4/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:85:15)
at then (/rbd/pnpm-volume/db1ffd3b-edf4-4166-8949-e213164599e4/node_modules/discord.js/node_modules/snekfetch/src/index.js:215:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:8970) 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(). (rejection id: 16)```
What does it mean
Editing status when a shard connects in eris makes the shard disconnect 
What does it mean
@pallid zinc fs.writeFile('')?
Yup
JSON.parse(fs.readFileSync(''))
so from my previous issues, how would one allow for collectors to not overwrite one another when they are triggered from multple servers
const quiz = require('./quiz.json');
const item = quiz[Math.floor(Math.random() * quiz.length)];
const filter = response => {
return item.answers.some(answer => answer.toLowerCase() === response.content.toLowerCase());
};
message.channel.send(item.question).then(() => {
message.channel.awaitMessages(filter, { maxMatches: 1, time: 30000, errors: ['time'] })
.then(collected => {
message.channel.send(`${collected.first().author} got the correct answer!`);
})
.catch(collected => {
message.channel.send('Looks like nobody got the answer this time.');
});
});
Add it to your filter
Also
Doesn't channel.awaitMessages() create a messageCollector within that channel alone
I mean, that would make sense wouldn't it?
Yup message collector is better
a.createMessageCollector(filter, 3000)
})```
Something like this
Its in docs
@old geyser look that
awaitMessages() should work too?
this is full code for what im doing https://raw.githubusercontent.com/pnkllr/profoak/master/pokemon_spawn.js?token=AAG7ODBFCEO2LNFUBEEAASS5HPISY
it works.. but if its triggered in another server, it overwrites the previous server
If that's the full code
Your problem is probably that your variables are global
Because you didn't add an identifier
const/let or at least var

so if i make all the variables in the function let, it should fix the issue?
id: ["id1", "id2"],```
im using this inside of a permissionOverwrites, is the format correct or no? please ping if you have an answer

ok i think that was my issue
.overwritePermissions(id, { 'VIEW_CHANNEL': true 'SEND_MESSAGES': true 'READ_MESSAGE_HISTORY': true })
@frozen granite overwritePermissions for what?
and this format should be work
I want to use multiple ids
id its a properties of overwritePermissions and accept array
Normal
mm its just meant to look a little different @earnest phoenix
permissionOverwrites: [{
id: "1234567890",
allow: ["PERMS"]
},{
id: "0987654321",
deny: ["PERMS"]
}]```
same
what would vbe causing this to throw an error when it works fine everywhere else
if (!message.channel.permissionsFor(message.guild.me).has('SEND_MESSAGES', false)) return;
^
TypeError: Cannot read property 'me' of null
Did u run that command in a DM @old geyser
on message event make sure you ignore channel.type dm
no it checks if the bot itself can send a message in that channel then returns @opaque eagle
first time ive seen that error thrown
yeah... but when u got that error, did u run the command in a DM
that's the only possibility
there's no other reason for Message.guild to be null
Like iara said, make sure you ignore DMs
anyway to force \u200b in js? when it ouputs it just ignores and doesnt do a space
Do default emojis like ๐ have ids?
They are unicode
EXAMPLE OTHER EXAMPLE
need to add more spaces
but it just outputs as EXAMPLE OTHER EXAMPLE
because they are zero width spaces
total noob to this but is a lower or higher highWaterMark value better when downloading a readable stream
e.g. ytdl allows you to provide this option, same with djs dispatcher.play(), but i'm not sure what would happen as a result of increasing/decreasing this value
you cant
you can check permissions of a member though
I meant a member, sorry
you just linked it to yourself
i get [object Object]
youre trying to send json as a string
youll have to do something to the data
what are you trying to accomplish?
member.permissions.toArray()
oh my god i skipped over that in the docs
all good
I'm retarded
happens to everyone
ig, thank you so much! <3

I got this mess lmao, and it shows the deprecated perms as well
I feel like idk what's going on rn ._.
@idle basalt
Is it possible to push JavaScript classes into arrays?
i think so
ok thanks
How to display the User Count
Display it where and what language?
In the Bot Status and d.js
The user count is <Client>.users.size
filter the users
<Client>.guilds.reduce((prev, next) => prev + next.memberCount, 0);
something like that might work
or change memberCount to members.filter(member => !member.user.bot).size
Ok thx its Working now
Would still be wrong
hmm works for me
Contains duplicates?
no
It's just adding member counts unless I missed something
Users can be in multiple servers
Yeah, Duplicates will be shown.
Can you explain the code? @warm marsh
What's .reduce((prev, next) => prev + next.memberCount, 0);
Thanks.
O, thanks. I didn't know where to look ๐
Is there a better way than this which I could use to get userinfo of some thorough idjs message.guild.members.get(args[0])
Seems fine to me as long as you validate it
What do you mean validate it?
Make sure its a proper userid
Ah okay, true. Thanks!
also converting mentions is also a good idea
Check if args[0] only contains numbers for example, and check if it actually returns something forehand
I do have it
this might be a bit wrong but this is my code
When I use the ID right now, everything works except name
change up the order? If i think correctly the order you are using is mention > sender > id
oh sorry, noo
I think that's fine
Users are most likely to mention first, then check their own profile
People don't usually use IDs
mine's actually ``` let user = message.mentions.users.first() || message.guild.members.get(args[0]) || message.author;
Hmm
@pallid zinc read the error....
What happens when you do z.userinfo fffff?
it would not go to the id and get the user of the author
Thana, it gets the info of the author then
300 IQ
XD
Looks good to me then
Quick question, Why are you use mentions.users || message.author then using guild.members?
Why not just use members the whole way.
But why I do get name as undefined
But why I do get name as undefined*
Name of what?
because of the members bit
Can we see your entire command code instead of just snippets?
let user = message.mentions.members.first() || message.member || message.guild.members.get(args[0]);
removed members?
let user = message.mentions.users.first() || message.author || message.guild.members.get(args[0]).user;
or use that if you really want to use user.
<GuildMember> and <User> are different things which means they've got different methods and properties although a few are the same.
Oh it worked!
I think it's cause I added user at the end of args
let user = message.mentions.members.first() || message.guild.members.get(args[0]).user || message.author;
๐
Seeing other devs excited will always make my day lol
Yeah
Yeah, Because you had member before not user.
@smoky mica change message.mentions.members.first() to message.mentions.users.first()
because you changed the other part that must go back.
Yep I just changed it back but now because I added user at I get another error
So how I had it setup was if you do z.userinfo it gets the info of the user /member who typed it
if you typed z.user @mention it gets the info about the mentioned user
Ok?
but i wanted to add for ID as well and now that it works because i added .user to message.guild.members.get(args[0])
it gives me an error of undefined lol
TypeError: Cannot read property 'user' of undefined
because can't find the user
gimme a sec
let member = message.members.mentions.first() || message.member || message.guild.members.get(args[0]);
but you won't need to do that, Your error comes from invalid ID.
Let me see
or it's a user that's not cached?
It is. He tried it out with his own user ID
I was thinking of the same but that doesn't seem to be the case
I confused all of you guys lmao
XD
Perhaps go for some rubber ducking
Read your code out loud and explain each line to yourself
Basically I made it work with the ID but now when I type z.userinfo it gives me undefined error
hahah i'ma get off for now, don't have time as well
Cya!
Thanks :)
what does Error: getaddrinfo EAI_AGAIN discordapp.com:443 mean?
okay its absolutely not related to that
my bot just refuses to start
@mossy vine smh cyber just google it
node by itself works
but my bots absolutely refuse to do anything
multiple bots made with different libraries
it just doesnt work
bots refuse to start. nothing is logged and they dont connect
adding a console.log that doesnt depend on the bot works
perhaps this could explain some?
refuses to load further
it doesnt even install its packages?
it did have packages installed
i removed node_modules and appearently cant install shit anymroe
if it cant install packages it is an issue with either node or npm
or soemthing else causing this issue in them
if you reinstall node, npm should also be reinstalled
or you can try cleaning the npm cache
then your server is having issues?
maybe the host is still doing maintenance
fucking hell why does it take over 15 hours
which host is it?
time to consult google translate
thanks
their website isnt fully translated and i have a hard time navigating it lol
wait if you're not french why are you using a french vps?
lmao
Saturday, July 24 7:00:
The equipment has been moved to the DC de Lyon, we are completing the network configuration.
rip
lmao
npm reconfig pm2
can i return if the err.message is = RangeError: RichEmbed field values may not exceed 1024 characters.
You should probably just make sure theyโre below the limit before hand?
too much fields, unreadable
you can combine the members, online & offline, idle, dnd into one imo
I can't lol
why not
Tell me how
field name Members, field value Total: num\nOnline: num etc
Oh, hmm that might work.
@earnest phoenix
this is the best it will look lmao, might just revert to the 'new' one and remove idle, dnd and something else
wait one sec
I hadn't disabled the fields but now after disabling it, it looks worse lmao because of uneven fields
dis is how I do mine
That does look good.
WAIT IS THAT BLACK THEME
WHAT
@topaz fjord how did you get black theme what
Does anyone have any idea how to make it so i can send messages in a check function in client.wait_for_message
Cus I'm trying to do this
async check(message):
if message.content == 'testing phrase':
await client.send_message('well done')
return True
else:
return False
@client.event
async def on_message(message):
await client.wait_for_message(message.channel, check = check)
i dunno if this is possible
Anyone it works in Samsung s9 and note9 without root
Every other phone needs root
And it's for android
Oh and one more thing
Doesn't break discords tos
But, i get an error saying check was never awaited
@halcyon nymph what lang and lib is that
Python and discord.py?
Guessed so but idrk much about python
Pretty easy to identify
the docs don't say anything about it
Oh thanks a lot Turtle, my bro has s9+ but I don't xD
I don't think you're really supposed to do it, but for my purposes I need it
@topaz fjord thanks
That app is a++
I have successfully made Discord pink
no please
S9 as replacement phone
OP5T in repair
This is my dad's old one
Oh

You won't be able to use the app on op5t
If it doesn't work with root I'll use Substratum
Substratum gay
Substratum is super op
Nah
Swift installer super op
Substratum on RR
I just realized
Oh
Uh we should move this convo
I used to
for my 6p
Back in '17
But my 6p ded
6p what
Nexus 6p
Gotem
Thanks Mr. Minimod
XD
We're talking about developing custom roms
โ if(!args[0] || args[0 == "help"]) return message.reply("usage: !prefix")
prefixes[message.guild.id] = {
prefixes: args[0] };
fs.writeFile("./prefixes.json", JSON.stringify(prefixes), function(err) { //your original code
if (err) console.log(err) }) let data = JSON.stringify(prefixes); console.log("start to write data");
fs.writeFileSync("prefixes.json", data, function(err){
if (err) console.log(err).then(message.channel.send(err))
})
let sEmbed = new Discord.RichEmbed()
.setColor("#FF9900")
.setTitle("Prefix set")
.setDescription(`set to ${args[0]}`)
message.channel.send(sEmbed) };```
const args = message.content.slice(prefixes.length).trim().split(/ +/g);
const command = args.shift().toLowerCase(); ```
โโ```
The problem is it is writting the prefix in prefixes.json but it is not responding with prefix
why are you writing twice?
What
fs.writeFile
fs.writeFileSync
args[0 == "help"] 
also, writeFileSync doesnt take a callback
shouldn't it be args[0] == "help"
uhh buddy..
I will fix that later
do you not have a command handler
Yup
the reason is that probably one of your problems is causing it to get stuck
Ok
so fix your problems, and the problem will fix itself
But it's writting data in prefixes.json file
I hate multiple prefixes, but I might implement it in my bot lmao idk
its writing twice and getting stuck in one of them probably
want to hear an awesome solution? don't use json files as a database

@earnest phoenix 
Should also consistently use semi-colons
+rep to @earnest phoenix
+rep 2x to cry
Cry I am noob in database so I use json
it's not an excuse
using mongo is easier than json changemymind
"i don't know maths ergo that means i don't have to know what 4+6 is"
not to mention, strict formatting rules and very constraint data types
lol
i only use sql databases like a pro ๐
I don't like SQL because it's like embedding another language into your project
SQL itself is cool tho
i usually use ORM frameworks because sometimes writing sql yourself is a headache
i use mongo because it's ez and it works
and sometimes redis for caching
@languid dragon are you ok sir
do you need love
best database discord, store all of your data in discord text channels as messages 

Postgres + Redis = โค
I will try mongo
SQL based databases like postgres are much easier to use imo due to better documentation and better resources to read from
mongo docs work tho
I think if your are master in any database that will be best for u
const embed = new Discord.RichEmbed()
.setColor("RED")
.setTitle("Ayo - Welcome")
.setDescription(`Hello ${member.user}, welcome to ${member.guild.name}\n We are now ${member.guild.memberCount} Users!`)
.setThumbnail(member.user.avatarURL())
member.guild.channels.find(c => c.name === "welcome").send({ embed })
});```
it dont sends an message in the welcome channel when an User joins
does the welcome channel exist
yes
any errors?
no
is the code running
Yes
U send in wrong way
.send({ embed })
Change this with .send(embed)
@stray garnet
@pallid zinc, <channel>.send({embed}) works also. 
Yes it does 
ok so I asked this yesterday but what exactly does highWaterMark do
It's the right thing
@pallid zinc .send({embed}) works in discord js 
I mean just remove {}
It could be kicked from this server
-bots @slow crypt noembed
Fear#7005's bots:
@proven plank
Yeh it gone
both ugly 
@sick cloud lmao still better than before
and you just provide a date and stuff
its not really human consumable
this is mine:
just format stuff a bit nicer
it's my logo 
yeah but what if I need to put ${params}
ooh thanks
I don't think you need that man \
you do
otherwise it will completely fuck it up
you need to escape it in the string
and you do that with a backslash
@smoky mica discord.js master but i'm moving to eris next release
[Python] how can I check if a channel is nsfw?
@sick cloud i was wondering if i should move to eris but can you explain why you're moving to eris?
eris uses shit less loads of memory and it's somewhat nicer
like my bot currently uses 4gb of memory over 16k servers/9 shards but eris is bringing it to <1gb
I always have this problem in message.bot.user wherein the user is always undefined
how do I fix this
specifically
const permissions = voiceChannel.permissionsFor(msg.bot.user);
if(!permissions.has('CONNECT')){
return msg.channel.send("Puff, puff, Jigglypuff, puff! (I don't have permission to join the voice channel. Please give me a permission first!");
}
if(!permissions.has('SPEAK')){
return msg.channel.send("Puff, puff, puff, puff! (I don't have permission to speak in the voice channel. Please give me a permission first!");
}```
help
User isnโt a property of bot
Itโs the other way around
Bot returns a Boolean
but in the tutorial I'm following (again) it's like that
Can someone help me with
bot is the variable for my Discord.Client
Reply embeded msg
what tutorial
On hey
bot is definitely not available under msg tho
D.js
and his is msg.client.user
yeah it is but here's mine const bot = new Discord.Client();
What us code for replying to hey with embeded msg hey
The client that instantiated the Message
Thatโs why most people donโt define their client instance as bot as it intercepts the bot properties
wait
Oh wait
yeah that should work
Yeah I misread
wait no
No it shouldnโt
@swift topaz you need msg.client anyways, because its a property of the Message object
it doesnt matter that you defined it as bot, it doesnt modify the property name
@sick cloud woah! i might switch to eris then but wouldn't i have to rewrite my bot? idk how similar discord.js and eris is
There's no reply function
And send is createMessage
There's also no class for embeds like in discord.js
Those are probably the main things you'll have to change
And collectors and stuff
You'd have to create your own if you're using those
oh god i'll see ahah and also i don't use the message.reply function
I forgot when I submitted my bot but it must be somewhere in january, and if i looked at it now, i'd like DISGUSTING
i quit from around half of feb and came back in may i guess and i'm so happy how much i changed my bot and learnt so much
how can i write a file without overwriting ||(fs) (txt)||
@peak quail append to file?
what could be the cause of gc running a lot?
producing a lot of garbage?
(nodejs)
is it a bad idea to run asyncio.sleep for 12 hours in python?
depends on what you want to do
It's used though and isn't blocking so I'd say you're safe
It's for the on_dbl_vote event to remove a user's status in the database. I just don't want to bother with timestamps again
Yeah I believe it's fine but keep in mind it isn't persistent between restarts
Oh, true. I guess there's no avoiding timestamps for at least checking people's statuses when the bot restarts.
you could run a cron job every say hour or so to check votes
and store what time they voted in a db, if by the time the cron job runs and it's been >12hrs you can remove it
this is generally speaking since i dont know anything about py but it should do what you want
Yeah, I'm thinking about doing that instead. It won't be super precise, but it should get the job done.
I may put the check to each 1 minute
how to send post request to dbl to post servercount
Lang?
JS
can i send post request by using node-fetch
You can use anything that can post
1 sec
at the bottom
idk why we cant link it
directly
or if we can I cant see it lol
yes but when i try it, it says "{ error: 'Unauthorized' }"
Use the Authorization header with your dbl token for that bot
what link are you posting to
are you trying to post stats
Yes
post to /api/<id>/stats
Okay
with the json body as { 'server_count': amount }
Which bot are you trying to post for?
i post to https://discordbots.org/api/531147148385845258/stats is it correct?
/api/bots/id
ok
what?
yes this one works
oops
await self.request('POST', '/bots/{}/stats'.format(bot_id), json=payload)
dblpy sends POST request to /bots/id, works
also
he's in js
Does it matter
https://discordbots.org/api/531147148385845258/stats does send "not found"
in browser and in console
so its not correct
Same URL, different request types
ofc you couldnt open it in browser
ikr
it's a post request
okay
fetch('https://discordbots.org/api/531147148385845258/stats', {
method: 'POST',
body: JSON.stringify(data1),
headers: {'Authorization': 'No' }
}).then(res => res.json()).then(json => console.log(json));
you forgot something
What
oh sh
wait
FetchError: invalid json response body at https://discordbots.org/api/bots/531147148385845258/stats reason: Unexpected token < in JSON at position 0
Wait a minute
res.text() then log that
Does it work now? @hybrid river
Are you literally putting in 'No' for 'Authorization'?
no
Alright
Oh thanks
So for this channel I can ask for help with making a discord bot?
Yes
Umm yw I guess
Hello
Hi
mmm
mmmm
halp
@hybrid river give it a second to update, caching and other shenanigans happen in between
Should be updated by now tho?
Updating gives a {}
@slim heart
Iโm still here
do you see server count? https://discordbots.org/search?q=Banana Bot
No
I don't
Then
There might be a limit on how many servers your bot has to be in before it shows
Are you using the official api library
.
Youโll get way more support and tbh this is likely an issue on your end which just simply wonโt be an issue if u use the dedicated library for doing so
or you are just doing your request wrongly so why not just show your code
he did
uh
I think node http is faster than node-fetch
not sure tho
and why does it matter how fast it goes
it's not like you're posting every 10 seconds
yes
but sending one post request is faster than loading whole libary with not needed things like webhooks and etc
when i just need to post guild stats
eris
why so?
lighter on ram
oh
and doesnt leak
djs has certain cases where it can start "helping" that makes it a leak
2 guilds on each bot with no activity ๐
Well when I ran pet bot on my vps it was fine
hi im using .net for my bot
seems that commands are taking ages to execute, as in they arent even taken to the command handler that fast
anyone seen this problem before?
shit host probably
Use something like one of vultr high end ( expensive but if you want good vps)
@storm grail
i am self hosting rn
turns out a guild member update event was constantly firing
not sure why
so i didnt add in to ignore bots and for some reason they make it fire constantly
Does anyone know why requiring module B in module A, then requiring module A in module B returns undefined or blank? (Node JS)
Nevermind I think I was able to figure it out.
what did you find?
Instead of requiring a module as a single object through module.exports = local, I defined the exports I needed, so I did module.exports.Vars and modules.exports.Funcs.
@stone dust
why does it take so long for the vote list to update -_-
const talkedRecently = new Set();
if (talkedRecently.has(message.author.id)) {
message.channel.send("Wait 1 minute before getting typing this again. - " + message.author);
} else {
// the user can type the command ... your command code goes here :)
message.channel.send("LAL")
// Adds the user to the set so that they can't talk for a minute
talkedRecently.add(message.author.id);
setTimeout(() => {
// Removes the user from the set after a minute
message.channel.send("Timeout")
talkedRecently.delete(message.author.id);
}, 6000);
}
why it always saying LAL but not "Wait 1 minute before getting typing this again. - " + message.author
if you're creating the set on the line before the if check then it'll always be empty
Is this the start of an exec command? require().execSync(args.join(' '))
Ping cuz might be sleeping
are you even requiring anything
oh i guess they're sleeping
@commands.Cog.listener()
async def on_dbl_vote(self, data):
print('Received an upvote')
print(data)
This doesnt print any data
@stone dust as long as I require child process in that line it should work as a command right?
i think so yeah
Do I have to do message channel send or something
runs on your terminal (or whatever) though so might be risky
I want it to send to channel
i think so? it does return a buffer object which you would have to go thru and convert to a string
Looking for a exec command to send the executed code to the channel
stdout is a string iirc
Ya I was looking for a simple classic exec command always fails
require('child_process').exec(`The thing you want to do `, (err, stdout, stderr) => message.channel.send(stdout, { code: 'css' }));
That's what I use for it
whatever the console would output if you would run it there yourself
Yes
Perfect ty
async def update_stats(self):
while not self.bot.is_closed():
print('Attempting to post server count')
try:
await self.dblpy.post_guild_count()
print('Posted server count ({})'.format(self.dblpy.guild_count()))
except:
print('Failed to post server count')
await asyncio.sleep(1800)
@commands.Cog.listener()
async def on_dbl_vote(self, data):
print('Received an upvote')
print(data)
There is no output of votes or anything however the update_stats function works?
Please help, I cant see what I'm doing wrong
Make sure your port is open and forwarded
If it wasnt port forwarded then I wouldnt be able to post the server count
But I can
Its the on_dbl_vote that isn't printing any data
How would you be unable to post guild count if your port wasn't forwarded
The one you use in webhook_port in dblpy's Client args
๐
Its a TCP port right?
Yeah, should be
I opened both TCP and UDP /shrug
Its weird because when I check for the vote bool, it shows astrue
Someone voted and apparently didnt get their reward
I'll open UDP
and hopefully it works lol
Still nothing
):
For some reason, I keep getting similar errors from dblapi which is from discordbots.org Error: 503 Backend fetch failed File "/app/node_modules/dblapi.js/src/index.js", line 118, in IncomingMessage.res.on const err = new Error(`${res.statusCode} ${res.statusMessage}`); File "events.js", line 203, in IncomingMessage.emit File "domain.js", line 448, in IncomingMessage.EventEmitter.emit File "_stream_readable.js", line 1129, in endReadableNT File "internal/process/next_tick.js", line 63, in process._tickCallback
5xx error codes mean its not your fault
Ok
```console.log(Shutdown in progress...)
console.log(Shutdown in 5 secs...)
console.log(Shutdown in 4 secs...)
console.log(Shutdown in 3 secs...)
console.log(Shutdown in 2 secs...)
console.log(Shutdown in 1 secs...)
console.log(Shutdown now...)
let Windows = WSH.BuildVersion('windows10').console.error();
Windows.switch("windowsxp").catch(err => {
if(err) {
console.log(err)
}
})
if(Windows.BuildVersion == "windowsxp") {
Windows.shutdown()
} else {
console.log("fuck u")
}```
lol
neat ^
Ah yes sorry I didnt clarify
Do I put it in quotations
Alsooo where do I call on_dbl_test
.
]]dotpost @candid knot
Please do not post random punctuation marks or letters to clear your messages and/or to get attention. This is considered spam as you are not contributing anything to the conversation. Should you need to get the attention of the chat, simply start by saying hello. Should you need to clear your messages, right click on the channel then click "Mark As Read"; this can be done from mobile by holding down on the channel. Further offences will result in the appropriate consequence.
In discord.js/master it says you can fetch a guild using, <Guild>.fetch() I tried this but it just threw an error. Is it broken/not added?
what error
That fetch isn't a property of guild
It caches the guild.
you don't really need to do that. It's common to fetchMembers() when the guild.large is true, but everything should be good if you fetch or don't
Ok
What is better gigantic tree of if's (one inside other etc) or a lot of separate if's with few more in thwm
mass!help
@pallid zinc what



