#development
1 messages · Page 1455 of 1

bruh windows wants a $1.00 extension to reproduce this video encoding
Nope i dont think so
oof rip
dang
Did you see it?
2 mins
Ok imma go sleep
my video player wont let me
heyo
my reload command doesn't seem to work for some reason
It executes fine with no errors but nothing gets changed
Even if i tweak a command file and run it it doesn't see the changes
what is that command supposed to do
@sonic lodge how tho
i think it's an object(?)
delete require.cache
delete require.cache[filepath] iirc
or i can just delete the entire thing
sure you could probably do that
Quick question would logging words in a db as a array help split the words separately im doing a blacklist command
still no work 🅰️
🅰️
1 minute = enough filtering work for the rest of your life
Imma assume wrong ping 
nope
you asked about loggin words to a db for manual filtering for blacklist
in a minute, you'd have a fuckton of words
does it ever get empty tho?
I want my bot to go welp there are no emojis in this server mate when i run emote list in a server with 0 emotes
probably
wait no plz no tryitands.ee
Yes
🅰️
How can I get the id of a custom emoji from plain text?
Like message.content is  how can i get the id from it
Idk how to use regex plz spoonfeed
u want the id from that emoji?
couldnt u just args.slice it if it was just one emoji
@sterile lantern yeah i can but the emote returns with the <pogey part too
and the length of the emoji name matters so i cant substring
@quartz kindle master i need your halp
hmm is there not a id function for emojs
o
and the stuff i have is plain message text
ah ic
message.mentions.emojis doesn't exist too
oof
Nah not manual basically a mod can do g!bl add "word" so it logs the word for that server
I was wonder if I need to log it as an array so a server can have multiple words blacklisted
(node:1818) DeprecationWarning: ClientUser#setGame: use ClientUser#setActivity instead
what is this problem?
It tells youy how to fix it
How do I fix this again?
How to change the color of the brief description on my bot's page?
How can I do it?
LOL
client.user.setActivity bruh
Just change setGame to setActivity, what don't you get about it???????????????????????
I've never heard about ClientUser#setGame. Was that a thing in v11 or?
Yes
i guess so
Ah makes sense
ok i took care of the problem :D
Nice
how can i run a function over and over async python? like loop a func
Well I don't really know Python so I can't really help
Did you try looking on Google?
ah, that's infinitely easier then
what kind of db are u using?
Quick.db
ok, sqlite then?
Yep
just create a blacklist table with 2 columns, being serverid and word
oh, mb
also create an ID column
Aight
each time someone uses that command, create a new entry containing serverid and the word to be blocked
sure, you could use an array + single entry, but let's say it'd be one heck of long string
Hmm
also deleting will be many times easier with per-word entry
Blacklisting one word works but when I blacklist 2 it stops working
when retrieving server's blocked words, just query for the serverid
message.guild.emojis.fetch is not a function
well...how else would i get it
isn't it emotes?
no
no
lul
probably because you're getting more than one result
you need to treat it as a result set, not a single result
Aight
discord tricked me
you were emoterolled
I forgot to remove that puny little shit the >
well how do i remove it now
forgot that one function
Remove what
imma just do substring(0, string.length - 2)
So just let words = new db.table('words') words.set('words', args[1]) words.get('words')?
For a table
LMFAO
now im ^ to jason.db
I thought about an array but he said use a table 
Doesn't quickdb has push method?
how about you use jason.db
Yep
That's useful for your use case
is there a table.push
100x times better than json
yeah
umm why is it still doing dis
thats why I added it to jason.db
the id is correct now
didn't want to fuck with get and set for arrays
Check code
message.guild.emojis.resolve(emoteID); is what I'm using
stinky little djs doesn't have fetch
However the problem i found when logging words in an array is it doesn't separate them
So if I log 2 words I would need to say "word1 word2" for the bot to detect it
what do you mean
Well i am passing a snowflake
my god that url font
can you?
that wouldn't work tho
o
and the emoji id i passed should work but for some reason it doesn't
Lets use cache baby
Luckily discord.js-light has it
I don't cache my emojis except for some that the bot needs and I use guild.emojis.fetch(false)
😮
Epic
I don't cache shit
honestly I had no idea how caching worked
until I realized it was just client.X.cache is just an object
Wrong ID probably
Umm guys
When I escape the emoji the snowflake is different from what my bot saw
How da fuck
what you want to do?
The last six is missing smh
The emote is cache with that snowflake

i may or may not have fixed it for some reason
I changed a 2 to 1 and it works now
so i have a bot
when i make a new table (drop and then create), only the 2nd time it does work (mysql
but not the first time
If I make expressjs middleware if I want intellisense should I extend the Request and Response class and just return the extention?
how to fix it
well you can use the @type annotation
/** @type {import('express').RequestHandler} */
const myMiddleware = (req, res, next) => {
// Stuff
}
ok not what I mean but that was my bad
i have this to prevent this
so say I add req.randomValue = Math.random()
how would I add intellisense for req.randomValue
What if Discord gets hacked and snowflakes are changed to hello"; DROP TABLE users; --
oh um
I think I would extend it?
you can add a declaration file i think
where you make something like
declare module 'express' {
interface Request {
randomValue: number;
}
}
?
thats sql injection
ok oop is so fucking cool
indeed
not useful for everything but hot
u should use parameters instead of concatenating a string
if you just make a string, some unwanted input might get in and modify the sql statement
using parameters escapes the special characters in the strings so that they don't change the statement
well there it is
what if someone's ID happens to be 1201209182109281; DROP TABLE users;
Lmfao epic example
im not a fan of sql
well at least you should get used to using parameters
YOU ALWAYS HAVE TO TYPE LIKE THIS
and i find them more readable too
Yeah, they're easier to format
how to use parameters
no you don't
connection.query('SELECT * FROM users WHERE user_id=?', ['some-id'], (err, rows) => {...
you pass a string
using ? as a placeholder for parameters
then you pass an array of parameters
con.query("SELECT id FROM users WHERE id = ?", message.author.id, function(...
how can i run a function over and over async python? like loop a func
huh so SELECT * FROM ?? WHERE id = ? is a valid query?
make it recursive
using parameters, yes
cool
indeed
I don't think it matters
?? is used for database and table placeholders
? is used for normal value placeholders
like query('SELECT * FROM ?? WHERE id = ?', users, 12345678) would work?
the parameters must be an array
or a single value for one thing i think
so query('SELECT stuff', ['users', '12345678'])
but uhh many languages can handle unlimited paramaters
C++: c++ template<typename ... Args> sql::result query(const char* query, Args... args) {}
they escape special characters that might break your sql statement
like '
turns to '
It's for unsanitized input.
i mean \'
@quiet topaz Let's say you have this query: SELECT * FROM users WHERE username = ....
If I replace ... for ${username}, and had username equal to bob, it would be SELECT * FROM users WHERE username = "bob".
However, if I did bob" OR 1;--, it would come out as SELECT * FROM users WHERE username = "bob" OR 1;--, which gets every row in the table.
That's only one example of SQL injection, but to solve the problem, you'll use ? to set a placeholder, so characters like " aren't able to escape.
ok thanks, but i dont think, that will solve my problem
only once
idk mysql but maybe the first one errored because the table wasn't created
it is created
idk then
well the error is that result[] is returning undefined
yes, but whats the difference between before the error and after
yes
you can make a function to query stuff as a promise
or literally promisify it via util built-in package
how many callbacks is too many callbacks?
about 3 i guess
How much call could a callback call if a call back could call back?
a callback
function recusion (i) {
i = i ? i++ : 1
loggers.log(i)
return recusion(i)
}```
loggers
ok one sec lemme review the changes
ight
Blocking 
ok I just got called out to eat but im gonna need you to format the code the same way as mine I think I used https://www.npmjs.com/package/standard also change to 2 spaces and make sure you use the same error messages and stuff as me
um well aight
idk why this error is showing up:
File "main.py", line 117
async def with(ctx, amt):
^
SyntaxError: invalid syntax
Code:
@client.command(aliases=["withdraw"])
async def with(ctx, amt):
iirc you need a tab
also fuck comments
bruh
i didnt understand most of your constructor lmao
almost looks like minified code
no idts
you dont need a tab
all my other commands work fine
without a tab
nvm got it
I can explain it to you
nah i got it in the end
oh alr
well k
@digital mountain https://discordjs.guide/
Thxs
@earnest phoenix wait so i have to delete all my comments?
bruh
or
ill probably forget what everything does by tomorrow lmao
I could comment my code
ill pick one or another
yeah so I havn't used writeFile or readFile so idk
ig just keep it for now and I might change it later
great
Use eslint @crimson vapor
eslint be too advanced for me
alright
npm
do it in a different pr if you do
btw
I cannot live without eslint
I can live without it
never had to scale anything
@mellow kelp just wondering your status
you can search in discord from: member
oh lmao
With bot bruh
why
That's a bad approach
I agree
.. okay i wanna make a command. !messages
better idea
How can i do it?
I don't think its possible tbh
it possible
i saw this command
so possible xd
Can someone help me? I'm trying to add an add role command, but this error happens:
My code: ```js
let target = message.mentions.users.first()
let role = "788434221965770792" // The role ID
target.roles.add(role).catch(console.error);
events.js:292
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'add' of undefined
you sure roles has the method add()?
A User instance doesn't have a roles property.
i'm pretty sure it can, it has the required permissions and the role is below the bot's
You're looking for a GuildMember, which you can replace .mentions.users with .mentions.members for.
so which part do i need to replace?
The one I highlighted:
you can replace
.mentions.userswith.mentions.membersfor.
are there any rules on just copying people's eslint configs?
the eslint?
yea
or everything
the eslint thing
aight
swipe it from another repo
k
Hey, i wanna do a !messages command what says the all message what user sent. Please help me :/
since bots dont have access to search, youd have to log those into a database, which easily could be against discord TOS
guy said it
how many messages can you fetch at once?
and something about up to messages 2 weeks old
like 30 requests a minute
it aint letting me send my stuff for some reason
is there a way to check if uve been rate limited
Timeout {
_idleTimeout: 10000,
_idlePrev: [TimersList],
_idleNext: [TimersList],
_idleStart: 634,
_onTimeout: [Function],
_timerArgs: undefined,
_repeat: 10000,
_destroyed: false,
[Symbol(refed)]: true,
[Symbol(asyncId)]: 3,
[Symbol(triggerId)]: 1```
this is what i get
let webhook = new discord.WebhookClient(wid, wtoken)
webhook is defined as such
its printing that it went through
but its not posting
ping if yk the problem
nvm
async def on_ready():
await Seco.setup_database(Databse directory here)```
I have this event asking for a database directory I'm not sure what that exactly is
the docs for your database would be able to tell you.
Not against ToS: user agrees to having messages collected and aknowledges having them shown publicly
Agains ToS: everything else
Just the number of messages
that's ok then
you dont need to log each message then
yeah, just store a simple counter
How?
store a number
Sora .o.
then for each message sent increase it
?
Sorry
dw
Just got excited when I saw your pfp
normally people who call me like that are Shiro users, so I thought you were one of them
xD respe
Nah
(discord.py) How can i make a command that resets it's name everytime someones writes it so that i am the only one to know it s name? ex: .1234 and after the command is written it s name changes
I just like no game no life :3
you'd need to store a map containing name-command pairs
kinda useless tho
i mean
confusion
i wanna make simething that if the server owner betrays us i can give everyone admin (on my friends server)
lol
don't
Whaa
lmao
don't
idk what you said but no more badge
How detect Forbidden error, like this? (discord py)
friend or not, server nuking (what that is called) is aggressively against ToS
all it takes is one print + report for you to lose ur bot
try-catch
people kept making bots to get the badge
because people did everything to get one, even sending discord complete trash
literally
The dev badge isn't given out anymore because of too many people making bots just to get the badge
It's just a badge
it was way too simple to get one, so people purchased accounts, purchased team seats, purchased bots, etc just to get one
I tried everything, nothing worked
and the bot verify is off?
nice
did u really try try-catch block?
Hello, I speak Spanish, only I must use a translator to understand them. Say today is Camilo's day and I also want them to accept me
try-catches would probably catch such errors
what?
How can i do it?
variable
This guy saying the exact same thing in different channels
use a database, like you'd use to store full messages
🗿
yo, angelo
about that
um okay
that I speak Spanish I want to say and that I do not want to be rejected
Yo sanis
are you talking about your bot?
quien habla español
you mean this?
yes
who speaks Spanish
Me 
yo :D
uhi gracias por fin alguien que habla español
say a word in spanish
the problem is not this, I can catch the error, it is not possible to track down the type of error so that the bot would output the appropriate message - "the bot lacks rights"
Hola yo soy kouhai :3
english only
yea
I'm Dominican owo
no one cares smh
thanks, i`ll try
ok this happens if you do not add the if (message.author.bot) return; at your AI's at DM lmao
Most of my friends irl all speak Spanish 
same
and?
@pale vessel you alive?
nice
barely
poggers db?
I think its having an existential crisis.
lol
Hey, i tried to use database, but it not working for me. How can i do this !messagescount command without databse?
he is adding comments and them ima change to 2 spaces indentation
you don't
you can't
no database = no permanent data = no counter
okay ty.
you could use something simple like enmap
:c
basically a map but persistant
Nice
okay okay don't bully me, i try. thats the first.
Who is bullying you
I preceded
Uh..ok I guess?
Okay i can't.
How can i use map?
docs
alright I didn't know there were 2 sites
Thank you
@umbral zealot evie.codes or evie.dev
both
Hi, I don't remember the website that can generate some images like this one. Does anyone have the website ?
yep
just a sec
oh, thanks. Mention me when you got it please :p
We serve fast and scalable informational images as badges
for GitHub, Travis CI, Jenkins, WordPress and many more services. Use them to
track the state of your projects, or for promotional purposes.
here
In guildMemberAdd event:
If i will use:
member.guild.fetchInvites().then(invites => {
console.log(invites);
}).catch(err => {
console.log(err);
})
How can I check what invite he came in from?
you don't
you need to store invites' usage count, then after someone joins you compare the current count against the stored one
the one which increases is the invite used
ok
Thanks !
How do I deploy the bot?
What host
I do not understand
🥴
host server
You have a VPS?
ترجمه وتحدث معه @delicate kraken
hey guys so im tryna detect when someone joins a specific vc and then let my bot send a message in a specific channel
so i found this code
client.on('voiceStateUpdate', (oldMember, newMember) => {
const newUserChannel = newMember.voice.channelID
const oldUserChannel = oldMember.voice.channelID
const textChannel = message.guild.channels.cache.get('757258023432486923')
if(newUserChannel === '712677767333937284') {
textChannel.send(`${newMember.user.username} (${newMember.id}) has joined the channel`)
} else if (oldUserChannel === '779010277823741972' && newUserChannel !== '779010277823741972') {
textChannel.send(`${newMember.user.username} (${newMember.id}) has left the channel`)
}
})```
but it says
```TypeError: Cannot read property 'channelID' of undefined
at Client.<anonymous> (D:\github\pepe-bot\index.js:38:44)
at Client.emit (events.js:314:20)
at VoiceStateUpdate.handle (D:\github\pepe-bot\node_modules\discord.js\src\client\actions\VoiceStateUpdate.js:40:14)
at Object.module.exports [as VOICE_STATE_UPDATE] (D:\github\pepe-bot\node_modules\discord.js\src\client\websocket\handlers\VOICE_STATE_UPDATE.js:4:35)
at WebSocketManager.handlePacket (D:\github\pepe-bot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (D:\github\pepe-bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (D:\github\pepe-bot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (D:\github\pepe-bot\node_modules\ws\lib\event-target.js:132:16)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (D:\github\pepe-bot\node_modules\ws\lib\websocket.js:825:20)
PS D:\github\pepe-bot>```
does anyone knows how to fix this or another way to do this?
voiceStateUpdate does not give you members
it gives you voiceStates
so you are essentially doing voice.voice.channelID
so i should do voice.voice.channelID ?
im sorry but i dont understand it
do you know how events work?
nope
🤦♂️
na u can read the docs tho
tim do u know what i should do?
@quiet arch ```js
client.on("something", (someData) => {
// do something with someData
})
look at this code and try to understand what its happening. It creates an event listener called "something", which means whenever your program receives data that is assigned to "something", all the code inside that block will run. When this happens, the event will give you a variable that contains the data it received, so you can do something with it. In the above case, the program receives some data assigned to "something" and gives it to you, and you assign the same "someData" to the data the event is giving you, then you run some code with this data
the variable someData is named by you, you can give it whatever name you want, it doesnt change its content
ok
in your case, you are listening to the voiceStateEvent which means every time your program receives some data that tells you something changed in a voice channel, the entire code inside that will run
and accordingly, the event gives you 2 pieces of data, according to the docs
ok
yes
these are the two pieces of data you are receiving
so when you do something like .on("voiceStateUpdate", (a,b) => {})
@quartz kindle what bot do you have?
async def beg(ctx):
await open_account(ctx.author)
users = await get_bank_data()
user = ctx.author
earnigs = random.randrange(100)
await ctx.send(f"Someone gave you {earnigs}$")
users[str(user.id)]["wallet"] += earnigs
with open("bank.json","w") as f:
users = json.load(users,f)```
So this keeps on wiping the entire Json file instead of adding the money to it can you help me
the a and b are names you chose, you can give them whatever names you want, it doesnt matter
pls help me
but the contents of a and b will always be what the docs says, regardless of what name you give it
ok
the docs say the content is voiceState
@quartz kindle which bot do you have?
so you can do to the docs and click on the voiceState and read what you can do with it
would this log an array into a db im making a bl command? ```let data = {
staff: [args[1]],
}
db.push(`wordsdb_${message.guild.id}`, data)```
sure ill do that then
voiceState is not a member, its a different type of data
but the only thing i dont understand is the error that i get
Tim can you please answer my question?
bc y is channelID' of undefined
because in your case, you named a and b as oldMember and newMember
so oldMember and newMember become the names you give to the data
but the data is not a member data
its a voiceState data
and voiceState data does not have .voice
helpe with this
the token
thx
whenever you get an error like "X of undefined", the problem is always what comes before X, and not X itself
"channelID of undefined" means the code tried to do undefined.channelID
o
meaning whatever is before .channelID is undefined or invalid
so voice is undefined
yes, .voice is undefined
@sharp birch make a file called config.json put this in it { "token": "token here" } then in your main file do ```const config = require('./config.json')
client.login(config.token);```
i have 3 bots, you can use the command -bots MYID in #commands to see
and then,
thats it
Hello Tim
put a token at config.json right?
yep
easy
where it says "token here" put the token
alr
so rn i have a roblox request:
it sends a request to see if the group gained a member,
if it did, send an embed with the group count being updated
but the problem is, it sends an embed even if the group didnt gain a member
whats the response look like.
let webhook = new discord.WebhookClient(wid, wtoken)
async function updateCount() {
let response = await axios.get(`https://groups.roblox.com/v1/groups/${GROUP_ID}/`)
let response_count = response.data.memberCount
//console.log("got request")
if (count < response_count) {
console.log(response_count, count)
const embed = new Discord.MessageEmbed()
.setColor("#FFDAB9")
.setThumbnail('a link here')
.setAuthor('thing here')
.addFields(
{ name: 'Current Count:', value: response_count, inline: true },
{ name: 'Members left till 27k:', value: GOAL - response_count, inline: true },
// { name: 'Goal', value: GOAL, inline: true },
)
.setFooter("group Member Counter")
.setTimestamp()
webhook.send(embed).catch(async err => {
console.log(chalk.red('Issue with posting in: ' + err));
});
if (count == 0) {
count = response_count
return;
}
count = response_count
}
}
setInterval(() => {
updateCount()
}, 20000)
i think it has something to do
with setInterval
sends this
here it remains at 159
and sends like
every 5 mins
try to parseInt on both
also, wheres count at
count?
yeah, wheres it defined
parseInt(response_count) and parseInt(count)
parseInt should fix it, the API is probably returning a string.
where would i parse int it?
where i define it?
let response_count = response.data.memberCount
if (count == 0) {
count = response_count
return;
}
count = response_count
}
}
setInterval(() => {
updateCount()
}, 20000);```
uh wdym
or reset in some other manner
where do you define count
above the function
lemme send the whole thing
const axios = require('axios');
const discord = require("discord.js")
let GROUP_ID = groupidhere
let GOAL = 27000
let count = 1
let wid = process.env.wid
let wtoken = process.env.wtoken
let webhook = new discord.WebhookClient(wid, wtoken)
async function updateCount() {
let response = await axios.get(`https://groups.roblox.com/v1/groups/${GROUP_ID}/`)
let response_count = response.data.memberCount
//console.log("got request")
if (count < response_count) {
console.log(response_count, count)
const embed = new Discord.MessageEmbed()
.setColor("#FFDAB9")
.setThumbnail('this is a joke')
.setAuthor('kewlg')
.addFields(
{ name: 'Current Count:', value: response_count, inline: true },
{ name: 'Members left till 27k:', value: GOAL - response_count, inline: true },
// { name: 'Goal', value: GOAL, inline: true },
)
.setFooter("group Member Counter")
.setTimestamp()
webhook.send(embed).catch(async err => {
console.log(chalk.red('Issue with posting in: ' + err));
});
if (count == 0) {
count = response_count
return;
}
count = response_count
}
}
setInterval(() => {
updateCount()
}, 20000);```
i just restarted the project and it sends that
let response_count = parseInt(response.data.memberCount);
no since count is just an integer already
yes probably
so ill wait a while
also, am i crazy, or is this line doing nothing?
if (count == 0) {
count = response_count
return;
}
since the next line sets it anyway, and its the end of the function.
uhh i forgot what i wrote that for
i think it was meant to stop if count was set to 0?
aight seems to work!
👍
does response.data already return the parsed json object?
i dont use axios
because i checked the url, and memberCount is already a number in the json response
you could try using this: https://www.npmjs.com/package/noblox.js
noblox doesnt have that function
is it bc
if (count == 0) {
count = response_count
return;
}
of this
?
happens approximately every 5 mins
i doubt it, the count in both is logging correctly right?
ie both counts in your console log are logging as 26844?
1?
yes
1 is incorrect
your count should be getting set as response count
so it can compare them on the next loop
i dont have my thing open but this is what it does, console.log(response_count, count)
yeah, so first loop it should log 1, then next 26844
where can I do my bot so where will I write my commands
that doesnt happen tho
so idk
Do you know where to start making my bot, which application or which site?
2|stats | File "/usr/lib/python3.8/asyncio/runners.py", line 43, in run
2|stats | return loop.run_until_complete(main)
2|stats | File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
2|stats | return future.result()
2|stats | File "/root/arch/ARCH BOT/cogs/botstats.py", line 22, in updatestats
2|stats | list1 = json.loads(list1)
2|stats | File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
2|stats | return _default_decoder.decode(s)
2|stats | File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
2|stats | obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2|stats | File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
2|stats | raise JSONDecodeError("Expecting value", s, err.value) from None
2|stats | json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)``` anyone explain this erorr pls?
py
text editor
Would recommend vs code
then you would pick a lib
For whichever language you use
Can i see whats inside your json file
@drifting wedge random thought, no idea. does the json you put in to the decoder have nothing on line 1?
Expecting value: line 1 column 1 (char 0)
show me your json file
it gives this erorr
weird
uhhhhhh
its kinda confidential info
it works with python3 tho
I don't understand which site I started to make my bot
What?
wait
Read what i told you
its a list tho?
you dont need a website to make a bot @weary bane
not a file
ye its a list
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
stdout, stderr = process.communicate()
list1 = stdout.decode("utf-8")
list1.strip("[]")
#print(list1)
list1 = json.loads(list1)```
If I don't need a website, where will I do it?
can you show what the result of printing that list is
If I don't need a website, where will I do it?
A text editor
Text editör ?
Read what i pinged you
It's a practice
Here
like the list?
yes
how exactly would i fix the thing from being spammed
this
its HUGE
I have a text editor computer and I don't know how to code. Where can I learn so much?
my oh my
which programming language interests you?
If it is strictly bot developing id tell you python using the discord.py lib
if you use discord.js, there a TON of yt tutorials
uhh
Same can be said for discord.py
@hollow sedge ill send it in a bit
Stack overflow + github + their official server
personally js was easier to understand
ok
but everyone has their preferences
Turkish
py imo is harder to find good support for.
attempted to yes
would disagree tbh lol
Oi gente
yeah wdym
Traceback (most recent call last):
File "C:\Users\culan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\culan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "C:\Users\culan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\discord\ext\commands\core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
for discord bots
I said an programming language
yeah you're right then
same errorr!
i would disagree
Oi gente
their server provides you full help of whatever you want to accomplish
pretty sure that error has something to do with encoding
??????
There are many repos giving you examples
cloud ill send full dict in a min
ok
And other googling questions om stack overflow
plenty of repos, not a lot of direct support.
Their official server would providr direct support
Idk if this works for everyone but
{
}``` this is how I fixed mine lol
All my jazz on file requires should be
}``` but it's not working
what
?
Yea its active lol
"Idk if this works for everyone"
I got that error once so i did that and it fixed the issue
🤔
i mean...............ok
oh heck, the python server is poppin too
https://stackoverflow.com/questions/16573332/jsondecodeerror-expecting-value-line-1-column-1-char-0 @drifting wedge
Idk maybe this may help
nah
The owners went above and beyond
that has to do with a request
F
although...There is no need to decode a response from UTF8 to unicode, the simplejson / json .loads() method can handle UTF8 encoded data natively.
yeah, time to bother them until i know python, thats how it works right? 
@drifting wedge

the python server feels too organized imo
oof
lmao
```let words = db.fetch(wordsdb_${message.guild.id})
let blacklist = [`${words}`]``` this should format the words as an array right? im making a bl command
so i should read it with the long form?
If you mean /python, their help channels are weird but very clean
you dont need to use string interpolation for a single variable and something that is already a string
so just let blacklist = [words]
i dont see why you would need to put that between the brackets anyway
to make it a list
how would i fix my problem (embed sends even if the response count is not increasing)
since im logging multiple words i need to seperate each word
const axios = require('axios');
const discord = require("discord.js")
let GROUP_ID = groupidhere
let GOAL = 27000
let count = 1
let wid = process.env.wid
let wtoken = process.env.wtoken
let webhook = new discord.WebhookClient(wid, wtoken)
async function updateCount() {
let response = await axios.get(`https://groups.roblox.com/v1/groups/${GROUP_ID}/`)
let response_count = response.data.memberCount
//console.log("got request")
if (count < response_count) {
console.log(response_count, count)
const embed = new Discord.MessageEmbed()
.setColor("#FFDAB9")
.setThumbnail('this is a joke')
.setAuthor('kewlg')
.addFields(
{ name: 'Current Count:', value: response_count, inline: true },
{ name: 'Members left till 27k:', value: GOAL - response_count, inline: true },
// { name: 'Goal', value: GOAL, inline: true },
)
.setFooter("group Member Counter")
.setTimestamp()
webhook.send(embed).catch(async err => {
console.log(chalk.red('Issue with posting in: ' + err));
});
if (count == 0) {
count = response_count
return;
}
count = response_count
}
}
setInterval(() => {
updateCount()
}, 20000);```
parseInt'ing it didnt help
You would check if the current amount is the same as the amount it was before
Then ignore it
@sterile lantern something is resetting your count variable
but i dont know what
if (count == 0) {
count = response_count
return;
}
count = response_count```
?
this
is count used somewhere else in your code?
uh
no
well
if (count < response_count || count > response_count) {```
there
then it console.log(response_count, count)
wow < or > ouch...
what in about other functions, or is this in another function.
How about !=
the project consists of
I feel physical pain
```let words = db.fetch(wordsdb_${message.guild.id})
let badlink = new MessageEmbed()
.setDescription(`You cannot say bad words in **${message.guild.name}**`)
.setColor("RED")
if(message.content.toLowerCase().includes(words)) {
message.delete()
message.author.send(badlink);
}``` this is the new code i get no errors but it does nothing
lol, also why is that your code when the code you gave us is different.
data = json.load(read_file)``` this isnt a file
wdym?
who are you talking to
Are you ok


