#development
1 messages ¡ Page 1790 of 1

I always do
perfect
So what exactly is the problem
You have to give root access to termux itself
#!/usr/bin/ksh
# Directory in which you want to detect file change
DIRECTORY=/root/data/data
cd $DIRECTORY
list1=`(ls -ltr)`
echo "----- List 1 -----"
echo "${list1}"
while true; do
echo "Sleeping 5 sec!"
sleep 5
list2=`(ls -ltr)`
echo "----- List 2 -----"
echo "${list2}"
if [[ $list1 != $list2 ]]
then
echo "----------------------- File changed -----------------------"
diff <(echo "${list1}") <(echo "${list2}")
fi
list1="${list2}"
done```
attemping to run this
and how do i give root access to termux?
(complete noob btw)
Have you setup a storage on Termux before this?
never
If not try running termux-setup-storage
Then that should work
now run the originals script?
Sure go ahead
There is, you probably messed up the bash file syntax
JavaXP.com a blog contains simplified codes related to java/j2ee, JavaScript, HTMl, XML, Linux / UNIX, Databases like MS SQL, Oracle, DB2.
straight up from here
just changing the directory
to /root/data/data
hmm, "syntax error near unexpected token ls"
#!/usr/bin/ksh
# Directory in which you want to detect file change
DIRECTORY=/root/data/data
cd $DIRECTORY
list1=`(ls -ltr)`
echo "----- List 1 -----"
echo "${list1}"
while true; do
echo "Sleeping 5 sec!"
sleep 5
list2=`(ls -ltr)`
echo "----- List 2 -----"
echo "${list2}"
if [[ $list1 != $list2 ]]
then
echo "----------------------- File changed -----------------------"
diff <(echo "${list1}") <(echo "${list2}")
fi
list1="${list2}"
done```
this is what i used
prob cd directory failed?
i assume the path is right

let me test it rq
Probably

Wait lemme see something real quick
aight
Did it ask for storage permission or root access when you did termux-setup-storage?
Perhaps
sketchy
yes it is then
yeah i did grant it perms
i think it asked for media and something tho
media and photos?
Did it not ask for root access?
Install tsu through apt by
$ apt install tsu -y
and run tsu, it should ask for root access

after i typed su
Exit from that cell mode, either by exit or force closing the app then run what I said
Seems like you're using the old repos of apt
apt-get update ?
apt update -> apt upgrade -y -> apt install root-repo -y -> apt install unstable-repo -y -> apt install x11-repo -y
Yep, called it; apt install apt -y
Wait what the fuck
if you're clueless, im even more
Try apt upgrade -y
That's really strange
is 1.4.10-6 the latest?
Run termux-change-repo and select another main repo
hmm, that issue only happened to me once a long time ago
Really strange
@opal plank run apt purge game-repo -y and try updating again
You gotta run apt update to receive the new updates
same thing
the dev was mentioning what u said
about switching repos
termux-change-repo
Did you try changing it tho?
yes
Try choosing both and see what happens I guess
this one is single choice
going for the fisrt one
should i try the other mirrors?
Big pog
now try tsu?
Did you update those?
Btw run the 3 last command lines for the repos
Y
poggers, install tsu and run it
Perhaps you entered the wrong place idk, try ls -a
yep
I think it puts you in the wrong root dir wth
Wait a second, why not just sudo 
Outside of tsu shell
ah
apparently thats as far as it goes
im pretty sure i know where im at
but theres a lot of shit missing
thats the pc's windows folder
it might be putting me here
i need 1 up
Try cd /?

reeeee
sudo it is
pog now it works
so i might need to switch that script path and use sudo
yep
#!/usr/bin/ksh
# Directory in which you want to detect file change
DIRECTORY=/data/data
sudo cd /
sudo cd $DIRECTORY
list1=`(sudo ls -ltr)`
echo "----- List 1 -----"
echo "${list1}"
while true; do
echo "Sleeping 5 sec!"
sleep 5
list2=`(sudo ls -ltr)`
echo "----- List 2 -----"
echo "${list2}"
if [[ $list1 != $list2 ]]
then
echo "----------------------- File changed -----------------------"
diff <(echo "${list1}") <(echo "${list2}")
fi
list1="${list2}"
done```
lets try that[
fml
i need sudo to run that
alright we back
we back
But no idea about that 
I think its referring to the backticks
Or parentheses (?)
i mean it was there before
but without sudo
let me try running the original
#!/usr/bin/ksh
# Directory in which you want to detect file change
DIRECTORY=/data/data/com.grumpyrhinogames.idleapocalypse
sudo cd /
sudo cd $DIRECTORY
list1=`(ls -ltr)`
echo "----- List 1 -----"
echo "${list1}"
while true; do
echo "Sleeping 5 sec!"
sleep 5
list2=`(ls -ltr)`
# echo "----- List 2 -----"
# echo "${list2}"
if [[ $list1 != $list2 ]]
then
echo "----------------------- File changed -----------------------"
diff <(echo "${list1}") <(echo "${list2}")
fi
list1="${list2}"
done```
which is this one
I have a question about shutting down my bot. If, hypothetically speaking, I needed to shut down my bot for some reason but I wouldn't want to wait for the current running commands to finish, how would I go about doing that? Here's my code now but when I run the code this command will only run after the current running command is over.
command(client, 'emergencybutton', message => {
if (message.author.id == me) {
message.channel.send('Shutting down...').then(m => {
console.log('Shutting down...')
client.destroy();
});
}
})
Well yea, not sure how it throws a syntax error though
hold up you need sudo to access /
i figured what i did
sudo cd /
you'll never guess the big brain i done
What was the big brain move
what would happen, if, per se, completely hypotetically, i copied the WHOLE thing? (aka including the backticks for the codeblock)
You're probably processing commands synchronously

I wouldn't recommend doing that.
Since many users can be running commands simultaneously.

Hmm true
ctrl + a
ctrl + v moment
aight this seems to works
now i just gotta monitor that janky ass folder
ty so much voltrex
saved my neck here
aight, glad to help ya on your way 

You should try incorporating asynchronous processing (async/await) into your bot. Though, the client.destroy() may be problematic for shutting down a bot.
now to pay it back, i'll make sure to introduce u detritus once u have ur pc built so you can join us in the master racer

I sure will join the detritus cult

hmm okay its getting late for me so ill try it tomorrow, but what makes client.destroy() problematic?
All it does is destroy the websocket connection and set the token as null.
So unless you have the right checks in place, what it usually results in (from my experience) is a session failure (usually triggering an unhandled / uncaught exception).
But I haven't used Discord.js in a while.
A lot of users shut down their bot by killing their Node.js process (process.exit())
Ok
Thanks for the help!
For the async part, do i just put an async in front of each function?
Nevermind, I can figure it out đ
Thanks again
Destroying the client makes sense if you shutdown the (node) process for example.
Instead of let the client time out, destroying him will immediately close the session and shows the client as offline in Discord.
How fo width Canvas image so I can get Response like this
https://media.discordapp.net/attachments/223867697312694272/856761234758172672/Screenshot_2021-06-22-10-32-49-68.jpg
But I get is
theres a max width regarldess of scale
this is just size
if you measure the width that they are placed, its the same
not the ACTUAL image size, but the embed size
it looks bigger cuz the first one is 1x2 scale
while the bottom one is 2x1 scale
@opal plank
@wintry ice did u even bother reading what i sent?
sending code doesnt change what i said
jesus christ some people are just too much
excuse me
is that js in kotlin block ?
jesus christ some people are just too much
lmao
-why this no work?
-gives a thorough explanation as to why it doesnt work
-proceeds to not read anything and just send random code with basically a "fix it" tag below
lol
When making slash commands, can i define a valid number interval (like user can only enter 0-5), when i set the datatype to integer?
or do i have to make 0-5 as choices to work around that
Hey
This is my banlist command:
const Discord = require('discord.js');
const { deletionTimeout, reactionError, reactionSuccess, pinEmojiId } = require('../../config.json');
const ms = require('ms');
const db = require('quick.db')
const sourcebin = require('sourcebin');
const disbut = require('discord-buttons');
module.exports = {
name: 'banlist',
description: `Affiche la liste des utilisateurs bannis du serveur.`,
usage: 'banlist',
requiredPerms: 'BAN_MEMBERS',
permError: "â Tu n'as pas la permission !",
async run(message, args, prefix) {
const fetchBans = await message.guild.fetchBans();
const bannedMembers = (await fetchBans).map((member) => `Pseudo => ${member.user.tag} | Raison => ${member.reason}`).join("\n")
console.log(bannedMembers)
if (!bannedMembers) {
let msg = await message.channel.send("â Aucun utilisateur n'est banni du serveur !");
}
const bin = await sourcebin.create(
[
{
content: bannedMembers,
language: 'text',
},
],
{
title: `Liste des bannissements du serveur => ${message.guild.name}`,
description: 'Synapse',
},
);
let button = new disbut.MessageButton()
.setStyle('url')
.setLabel('Cliquez ici !')
.setURL(bin.url);
let componentButton = new disbut.MessageActionRow()
.addComponent(button);
const embed = new Discord.MessageEmbed()
.setTitle(`Voici la liste des bannissements du serveur !`);
message.channel.send({component: componentButton, embed: embed})
}
}
works but
I want to detect the member.reason to do:
if member.reason is null, member.reason = No reason
the latter
i see thanks man
maybe its coming in the future
it is, but not like that
as of now, i have not heard anything like setting ranges for ints
but theres a feature in the works that will fit just perfectly for ur use case
we just been told not to spread about it
but soonâ˘ď¸
dropdowns coming
but since then im making choices or validation on my bots side
i'd be much easier in detritus for u to do that
its a discordjs alternative iirc?
oke oke its written in js
jda has some cool shit about slash command handling too iirc
kuhaku was mentioning some of ti
yeah the new version is now a week out
so im starting to make slash commands
its pretty straight forward
but looks clean to me

oh sry for the ping
its pretty neat
its the other way around, if you DONT ping me, its likely i'll miss it
i see
but i still dont understand, why replies even have pings
normally youre in an active convo when using that
at least me
sometimes you reply to an days old mention, then its quite helpful
I do this:
const bannedMembers = (await fetchBans).map((member) => `Pseudo => ${member.user.tag} | Raison => ` + member.reason || "no reason").join("\n")
when the reason is null, the bot says null and not "no reason"
how do u remove a user's reaction again?
i guess youre just missing () around the ||
like (||) ? xD
like + (member.reason || "no reason")
Hello
I want help with something
I am using express-rate-limit for rate limiting my api
but it uses IP address by default
I want to use APi key for it
they have an option for it in the DOCS but i dont understand it correctly
Can anyone explain me how to do it
anyone know elixir?
needed help with the initial setup with supervisor. im new and im kinda confused
My current code is
let ratelimit11 = ...
let ratelimit2 = ....
app.get('something', ratelimit1)
app.get('something2', ratelimit2)
but since many people use heroku or replit
they have same IP
causing to cause a problem
hi
im trying to make a music command
and there are a command about You are not in a voice channel
but, when i join a voice channel during client is ready
it says you are not in a voice channel

can anyone help me ?
What an entertaining channel.
That means your code is wrong

why does ellipsis text dont work on firefox
man
if (!channel) return message.channel.send('**You must be in a voice channel for use that command!**');```
welp yeah its works on chrome
if (user.voice.streaming) {
How do I know if someone is putting the camera on?
Untill the detrituss documentation is not a mess, I'll stick with djs for now. Yeah2 I know the circlejerk DJS shit around here. But shit, I dont want to work on stuff I dont even understand to look at
ok sure
I'm glad I didn't write a beginner friendly discord library lol.
If I'm confident and proficient enough to make my own wrappers, not going to depend on any. Shit, djs taking forever to release v13, lmao and the glorified detritus here have shitty documentation. But that's that
Choose between different evils
anyone get this error ?
MinigetError: input stream: Status code: 404
at ClientRequest.<anonymous> (dir)
at Object.onceWrapper (events.js:422:26)
at ClientRequest.emit (events.js:315:20)
at HTTPParser.parserOnIncomingClient (_http_client.js:641:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
at TLSSocket.socketOnData (_http_client.js:509:22)
at TLSSocket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10) {
statusCode: 404
}
Can anyone help me please
with this
Does anyone know how to put the live server,member & channelcount in a website?
okay
this Rick Astley looks different
Either dynamically render the webpage server side or set up a simple rest endpoint that responds with user/server count and fetch and display the numbers client side
I would personally choose the latter but that's personal preference
could you be able to help me with that?
What language does your bot use? @earnest phoenix
module.exports = async (client, member) => {
const log = await member.guild.channels.cache.find(
c => c.id == logsetup && c.type == 'text'
);
if (!member.guild) return;
if (
!member.guild
.member(client.user)
.hasPermission(
'EMBED_LINKS',
'VIEW_CHANNEL',
'READ_MESSAGE_HISTORY',
'VIEW_AUDIT_LOG',
'SEND_MESSAGES'
)
)
return;
if (!log) return;
const embed = await new Discord.MessageEmbed() // Prettier
.setTitle(':boost: Server Boosted')
.setThumbnail(member.user.avatarURL())
.setColor('RANDOM')
.addField(
'User',
`${member.user.username} [Ping: <@${member.user.id}>], (ID: ${
member.user.id
})`
)
.setTimestamp()
.setFooter(member.guild.name, member.guild.iconURL());
log.send(embed);
};
Would this code work?
event: guildMemberBoost
idk try it
Well if I try
Then my boost will be loss for one week :weirdsip:
<@${member.user.id}>
just ${member.user}

Which token i have to provide in
const Discord = require("discord.js");
const client = new Discord.Client();
const DBL = require("top.gg");
const dbl = new DBL('Your top.gg token', client);
Â
// Optional events
dbl.on('posted', () => {
  console.log('Server count posted!');
})
Â
dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})
top.gg token?
you need to have one approved bot to get the token
ah wait it's in the edit page now my bad
Yup
go to webhook section on your bot edit page
Yup my bot was approved
you sure?
discord.js
Well its my second account
Iâm assuming itâs pretty easy to get a bot approved right, just donât break any of the rules they set? Havenât ever applied for my bot to be approved, thinking about cleaning it up for permissions and stuff to do that though
the bar is quite low tbf

they aren't going to deny your bot because of minor issues
if (args[1] === "reset") {
server.a = 1;
server.b = 1;
server.c = 1;
server.d = 1;
};
Any faster way to do this?
faster? no
smaller? yes
What do you mean smaller?
still not showing where?
there's a smaller way of doing that
On discord
Demonstration, please?
Object.entries(<obj>).map()
Well.. that is going to change all properties of the object to the value I set.. đ
the bot is not showing on discord?
not if you check key before setting the value
but as I said, that'll be a SMALLER method not FASTER
đ
Bot profile is not changing on discord i mean!
that takes time
because caching
also, make sure you changed the bot data not application
Does server only have a, b, c, and d?
Nope, some other properties.
.. like userID, cooldown, etc etc.
Example, not literal properties named those. ^^
but you only want to change a b c d?
for (const prop of ["a", "b", "c", "d"]) server[prop] = 1;
Well I changed the profile in application web
đ
That works???
I mean, there are two places in developer dashboard where you can change name/pfp
one will work, the other wont
Thanks KuuHaku and Flazepe. đ
Which place will work?
const Dbl = new DBL(process.env.TOP_GG, { webhookPort: 5000, webhookAuth: 'pass' });
Dbl.webhook.on('ready', hook => {
console.log(`Webhook running at http://${hook.hostname}:${hook.port}${hook.path}`);
});
Dbl.webhook.on('vote', vote => {
console.log(`User with ID ${vote.user} just voted!`);
});
correct
Ok
Why its not working
Yup
is port 5000 open?
well...there're webservers
like express and stuff
but still, did you check if the address is reachable?
use this and see if you can reach ur webhook address
server.a = server.b = server.c = server.d = 1
@quartz kindle
Wait.. wrong reply.
if you want even smaller text size, you could also do ```js
let s = server;
s.a = s.b = s.c = s.d = 1;
Yup.
Where to get started to make web apps ?
What all Languages to Learn ? What all are necessary ?
that's why I suggested iteration
yes you can use a loop if there are too many
đ
you need 3 things basically, front end, back end and database
front end is usually html+css+js
backend can be anything really, almost every single language out there is capable of running web servers and web frameworks
same with databases, there are many to chose from
Not sure why people prefer MySQL rather than NoSQL. đ đŚ
.. a lot of website uses MySQL, is there an exact reason?
SQL databases are pretty much the best at what they do
so react and all are backend ?
react is mostly a frontend framework but also has backend elements
ok so we need to learn frontend, backend and database to get started right ?
yes
for backend what languages do you suggest ?
whatever you're most comfortable in working with
the most popular ones are node.js and php i believe
ok
but you could also run java, python, go, etc
so we can choose either php or react ?
pretty sure you can use both
but react is mostly used with node.js
to take advantage of its backend elements
Hi
What is Full Stack Web Development with Flask?
fullstack = frontend + backend + database
Can someone just call himself Full Stack Bot Developer?
flask i mean ?
i meanwhat is flask
a webserver
oh
like express
is is a database ?
no
oh ok
Yup
no i mean express
yes
the one that solves your problem
and?
This is my discord bot 
no any ytbl bot working
what is equivalent of js map, in python?
nodejs
i see 5 bot cnt working
all lava link music bot working
but no node js music bot
all node js music bots use lavalink probably
dictionary is similar
how say
One message removed from a suspended account.
đ
One message removed from a suspended account.
yup
ok so ALMOST all
barely 50%
na na, I meant this one [].map()
i use ytbl core
One message removed from a suspended account.
cn you pls say wht the probleam happne
One message removed from a suspended account.
One message removed from a suspended account.
lol
python has map()
One message removed from a suspended account.
my and my friends music bot are working in ytbl core
One message removed from a suspended account.
not of anu play song
One message removed from a suspended account.
and also error cnt come in log
One message removed from a suspended account.
how
One message removed from a suspended account.
now how solve it
One message removed from a suspended account.
with
@rocky hearth
map() in python takes 2 parameters
like
def square(a):
return(a*a)
pp = (5,5,4,3,2,3)
result = map(square, pp)
print(list(result))
hello cn you tell how
One message removed from a suspended account.
how cn change ip
probably
gonna try and tell
and the map function accepts all three params as js map does, right?
3?
IDK
I know about 2
sorry to be unclear, [].map((n, i, a) => {})
And I see, it only takes one param, in python
yes
But you can provide multiple arrays
for the second parameter
PS C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous> npm install quick.db
npm ERR! must provide string spec
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\TAHIR ISLAM\AppData\Local\npm-cache_logs\2021-06-22T13_35_41_713Z-debug.log
why quick.db is not installing in my laptop
:/
cn you pls help me @sage bobcat
bro, show errors, u getting
can you telll me
what npm version u running?
latest
where?
in vscode
coz create a bot
and inthat bot creating a moddlogchannel where i need quick.db
do u hv opened the project folder in vsc
yes
do u hv package.json file in that?/
try running,
node --version
in terminal
ok
and npm --version
7.5.4
updating npm, should fix it I think
that's weird then.
may be try, deleting node_modules and intall all packages again
ok after doing that i will try again
node:internal/modules/cjs/loader:941
const err = new Error(message);
^
Error: Cannot find module '.npm ./../utils/structures/BaseCommand'
Require stack:
- C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\commands\utility\ModlogCommand.js
- C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\utils\registry.js
- C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
at Function.Module._load (node:internal/modules/cjs/loader:774:27)
at Module.require (node:internal/modules/cjs/loader:1013:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\commands\utility\ModlogCommand.js:1:21)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Module.require (node:internal/modules/cjs/loader:1013:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\commands\utility\ModlogCommand.js',
'C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\utils\registry.js',
'C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\index.js'
]
}
@smoky kestrelbro the latest npm version is 7.18.1
run npm install -g npm@latest
guyz does anybody has experience with yarn workspaces?
Thanks the older recomendation works
Log system is created đđ
Thanks for your help
Guys welp
I put this code In the top of my bot description but nothing happens
<style>
.body{
background-color:#32a852
!important;
}/*!sc*/
</style>
It does not change background color
@rocky hearth
Help bro
!important moment
see in the console, which property is overiding it
Remove it
Ok
No idea then
@hidden coral try this
.body{
background-color:#32a852
!important;
}/*!sc*/
</style>```
This is basically going off a class. It would work if the class is defined
Normally, if you remove the . and just have body that should work
@hidden coral
just me or is YTDL down
More than likely so, it goes down every couple of weeks 
I tried this also
<style>
.enity-content_dsscription {
background-color: #32a852;
}
body{
background-color: purple;
}/!sc/
</style>
Top.gg bot edit pages
@zinc wharf quick note my bot is not yet approved
Whatâs my discord
@zinc wharf
I just done some testing myself
use the .entity-wrapper selector
What is that how?
Do you know what CSS selectors are
No
I just want
To change the background image
Nothing else
.entity-wrapper { background: #somecolor; }
đ
Lemme try this too
This is also not working man
Do you have any other CSS
image or color ?
for color it's
.entity-wrapper { background: #ffffff; }
for image it's
.entity-wrapper { background-image: url('put://image.link/here.png'); }
I tried color
But it did not work
I even tried image it did not work
I don't have a pc sadly
is there actually no way to get dev tools on mobile?
I dunno
Any help is highly appreciated
If I remember
F12
it probably doesnt help you are mispelling things in your selectors.
What do mobiles have f12 button?
is there any way for me to see if YTDL is down
idk show your code
I'm stuck some help me with organizing data
more like modeling data and making schema for it
i'm using mongodb
schemas are overrated
use Typescript interfaces
I'm trying to make a welcome thingy
check: True/False
channel: channel_id
greet_data: { greet_type: "normal_greet"/"embed_greet"
normal_greet: {
welcome_msg: Text/String
image_data: {
check: True/False
title: Text/String
sub_title: Text/String
}
}
embed: "JSON Data"
}
}```
so far this is how i plan doing things
any other way around?
i give up
i don't know what tf is going on after greet_data
lemme explain
in greet_data i check if the greet_type is normal one which is just simple text or embed type
then I store the if the greet_type is normal_greet then i take data from normal gree
else from the embed one
which I'll be storing JSON data in string form
kinda sucks right?
can't you do like this
greet_data: {
greeting: NormalGreet | EmbedGreet;
}
and then
NormalGreet {
type: string;
welcome_message: string;
image_data: {
//Blah Blah
}
}
and
EmbedGreet {
type: string; //Either "normal" or "embed"
//blah blah
}
now it can save both types in a object
is this app can start a bot
ykw maybe add a type
yeah i could...
Just thought i will store the data in one object
client.distube = new DisTube(client, {
searchSongs: true,
emitNewSongOnly: true
});```
DisTube is not a constructor
Well it is
no
it's a browser
Bro I installed it
thanks.
Its written in npm readme
where are you defining DisTube
Discord login page does not load
const DisTube = require('distube');```
Second line of my index
Trying make welcome thingy just like mee6 has
C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\commands\utility\ReloadmodlogCommand.js:16
if(!args[0].toLowerCase()) return message.channel.send("Please provide a command name!")
^
TypeError: Cannot read property 'toLowerCase' of undefined
at ReloadmodlogCommand.run (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\commands\utility\ReloadmodlogCommand.js:16:17)
at MessageEvent.run (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\src\events\message\MessageEvent.js:33:17)
at Client.emit (node:events:394:28)
at MessageCreateAction.handle (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
at Object.module.exports [as MESSAGE_CREATE] (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
at WebSocketManager.handlePacket (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
at WebSocketShard.onPacket (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
at WebSocketShard.onMessage (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
at WebSocket.onMessage (C:\Users\TAHIR ISLAM\Desktop\venomous\Venomous\node_modules\ws\lib\event-target.js:132:16)
at WebSocket.emit (node:events:394:28)
how to solve this
Here I can't login to my discord so I can't edit my bot here I top.gg
I did the same thing you did and it worked fine
const Discord = require('discord.js')
const DisTube = require('distube')
const Client = new Discord.Client()
const tube = new DisTube(Client, { searchSongs: true, emitNewSongOnly: true });
args[0] dosen't exist (undefined)
@near stratus ^
what does it say ?
any errors ?
or it crashes ?
Nothing it just keeps loading
And if I go to https://discord.com/login

It gives this error
lol :/ .lowercase is undefined
1sec
I do my bot

args[0] is undefined
not . toLowerCase
That's weird
maybe a problem on discord's side
do this before the line
if(!args[0]){ return false }
Are there any other dev tools?
So why not for me?
No need to do this
bruh moment
Show me the code pls
before declaration
imagine using conditional chaining
args[0]?.toLowerCase()
that simple
I went for like 10 seconds and my discord crashes WOW
Noice
IDK
show your code
(more of it)
obviously no
const client = new discord.Client({
disableMentions: 'everyone'
});
client.distube = new DisTube(client, {
searchSongs: true,
emitNewSongOnly: true
})```
Anything else?
no
I literally pasted your code
That means one thing only
you're defining DisTube wrong
or redefining it
this is the code I'm using if you're interested
const discord = require('discord.js')
const DisTube = require('distube')
const client = new discord.Client({
disableMentions: 'everyone'
});
client.distube = new DisTube(client, {
searchSongs: true,
emitNewSongOnly: true
})
client.on('ready', () => {
console.log('Erwin\'s avatar:')
client.users.fetch('188836645670223872').then(r => {
console.log(r.avatarURL({ size: 1024 }))
})
})
Now its giving me `cannot send empty message ``
But idk from where

Well, look at the places youâre sending messages at
And look for possibilities of those being empty
which line ?
it shows in error
like at the bottom of error
with character position
that's why you should .catch every single promise
well, you missed one at least
Yeah... your error tells you that it was an uncaught exception
and ?
And it works when it edit the html in the site and put the code but does not work if I put the same code in description
did you put the css in <style> tag ?
in description
Same
same thing here.

show code
and join in Line with Jelly Dev
I tried with <link rel="stylesheet" type="text/css" href="https://drive.google.com/uc?export=view&id=1_20Ax9hkQpbxNaCP5IdDnSCydlIZ5_WE" />
Wait a minute
Jelly is your bot verified ?
and with <style></style>
My code is this
<style>
body {
background-color: purple;
}
</style>
The bot I am trying to add css to is not verified yet
Discord verified ? No
Not even approved in the website
why hell on earth would you put it in Google drive ?
I used style tags, and tried both. None work
that might be the issue
not sure though
Oh
Ok thanks for staying with me and helping me
Appreciated
as you can see I use both tag and link
and both of them work somehow
Then its because the bot is not verified. Thanks for the help tho! Appreciate it
wait you have green role though
thought it was verified
I have a verified bot. The bot I'm trying to add css to is another one. Its not really mine haha
Just helping a friend out
How to find out the bot commands?
You don't find out
you make them
cuz you're in #development
ok ty
then
I completely forgot about you
before the line you're doing args[0].toLowerCase()
yeah bro. its javascript definitely not html
Use .entity-wrapper instead of body
heyy
anyone know discord.py
What's your issue
well
or question
I was trying to find the users using my bot in total from all it's servers
do u know which all games work on this discord vc thingy
client.users.cache.size
brr
oh
and I did
@sour pine command
async def testing(ctx):
await ctx.send(f"{len(client.users)}")
but it says 0
length
Probably because you don't cache users
There's no length in Python
Please don't try and help if you don't have any idea yourself
how do I do that
I have and stop it
You could go over guild.member_count of each guild object and decrement 1 from it to ignore your bot
and get the sum of that
I don't have intent turned on
it doesn't let me
How
it doesn't let me turn it on
it does like a cross sign thing
when I hover my cursor
over it
HELP ME CREATE THE ID IN DURSH
You don't need those
then which ones
ok
HELP ME CREATE THE ID IN DURSH
You have to be shitting me
??
Guild.member_count requires the GUILD_MEMBERS intent to be turned on
and since it's privileged, you'd have to apply for it
aa..
Ok
I doubt Discord will accept it
Give me a minute, I'll search for a way
is the bot verified ?
no
then just turn it on from bot settings
no need to apply
you'll need to apply when getting verified
by Discord
or is there any way to use components in d.py?
it isn't
wait then how are they grey
idk
Did you get to 100 servers at some point
I don't think so
You probably did since the privileged intents are greyed out
so what do I do now
where tf are these greyed out ?
Apply for verification along with the Server Members intent
ok
thanks for the help
For you they're not
For the guy they are
that's what I'm saying
the bot's in 96 servers
not verified
then why ?
(Just realized it takes 6 months to get whitelisted for intents atm)
It got to 100 servers at one point
no update from official doc?
And Discord locked them
probably
What do you mean?
lib*
The package says they'll be supported in v2.0
Don't know if that's true, but đ¤ˇ
oh
I wanna make a class command, that shows all classes for a fighting / roleplay bot, I am coding. However, I'm stuck at sorting the stat values with the actual classes. Could someone help me?
Code: (marked where the error is with comments): https://sourceb.in/RlPrTnYUM9
That's not how you use for statements:
for (const something of some_iterator) {
// Use something here...
}
is the correct way of doing it. Also, for is a statement, don't assign it to a variable. class is a reserved keyword, use another name. Everything else is okay
Weird, now I get "Unexpected Token: }" for the data thing
for (const something of some_iterator) {
// Use something here...
}
đ
Still the same error for:
data = {
name: editedName,
value: editedValue ? "Unknown..."
};
Do you recommend any of these intents? And why?
depends what your bot requires really
https://discord.com/developers/docs/topics/gateway#list-of-intents you can see the events that each of those intents allow here
Integrate your service with Discord â whether it's a bot or a game or whatever your wildest imagination can come up with.
can I afford them still later after submitting the verification?
you can request them later i believe, yeah, but it is ideal if you request the ones you need now
theyll probs take a while to get back to you
i think this question might be better in the server to do with the lib you are using, because different libs will have different needs in terms of how they work and handle caching of these events, and how they can impact other stuff etc
with?
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:85548) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 43)
(node:85548) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions
at C:\Users\GAMER\Desktop\lypsed\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:85:15
at C:\Users\GAMER\Desktop\lypsed\node_modules\snekfetch\src\index.js:215:21
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:85548) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 45)
when i start my bot, the console starts spamming me 50 errors per second
your bot appears to be trying to do an action it doesnt have permission to do
// ||||||||||||||||| N S F W
client.on("message", async message => {
const args = message.content.slice().trim().split(/ +/g);
const command = args.shift().toLowerCase();
if(command === "%nsfw") {
if (args[0] == 'enable') {
channel.edit(channel, {
nsfw: true
});
message.channel.send(`Se **activĂł** el NSFW en el canal ${channel.name}`);
if (args[0] == 'disable') {
channel.edit(channel, {
nsfw: false
});
message.channel.send(`Se **desactivĂł** el NSFW en el canal ${channel.name}`);
}}
}});
```I wanna try to do this
activate or disable NSFW in a channel
maybe it doesnt have the manage channel permission?
yes, it has permission and I'm testing it on my server, the weird thing is that the console spams me 50 errors per second
lol
then it might not be that
and the weird thing is that it gives me a permission error too
try and find what else could be happening 50 times per second, and where it could be erroring on permissions
then maybe try commenting out parts of ur code, see if you get errors, then keep doing that until you narrow it down to where it is coming from
itll come from an action (like sending a message, or editing a channel), so try from there
maybe it is the property to edit the channel to activate the nsfw, is it well done?
channel.edit(channel, {
nsfw: true
});
its a permission error, the only issue with your code is the lack of permission checking on whether the bot can perform the action or not
actually why are you passing "channel" into that method?
it should be
channel.edit({ nsfw: true });
ill try
make sure to always read the documentation, it honestly helps so much
ok now the console does not give an error, I'll see if the command works
channel isnt defined
ill define it like:
let channel = msg.channel ?
no need to create an extra variable for it, assuming youre trying to modify the channel that the message was sent to, you can reference the channel using that:
message.channel
where is channel defined?
top
The robot is not a thigh
dont use discord.js v11 jesus
// ||||||||||||||||| N S F W
client.on("message", async message => {
const args = message.content.slice().trim().split(/ +/g);
const command = args.shift().toLowerCase();
let channel = message.channel
if(command === "%nsfw") {
if (args[0] == 'enable') {
channel.edit({ nsfw: true });
message.channel.send(`Se **activĂł** el NSFW en el canal -> ${channel.name}`);
//
if (args[0] == 'disable') {
channel.edit({ nsfw: false });
message.channel.send(`Se **desactivĂł** el NSFW en el canal -> ${channel.name}`);
}}
}});
What should I do then?
update ur js version to v12
you should use v12 discord.js
Go back to the old versions?
do you get any errors? are you sure it doesnt work?
the console does not give me any error
no
what
ouch
Oh ok thank you
take a good close look at the brackets of your if statements
it's nothing serious, it's a bot to hang out on my server only
k
i cant see error







đ
°ď¸ 






