#development
1 messages ยท Page 959 of 1
im kurdish
well
So he can read
lol
color help
busted on a other level ๐
dude...
:DDDDDD
@slender thistle
initiate mod alert
help๐ฅบ
which part of bot commands only work in #commands and #265156322012561408 didnt you understand
we did it
also we use client.executeWebhook() to send something to a webhook right?
I don't think color bots will work here tho
idk, if it says so in the docs then yes
hey
also does the bot needs to be in the server that has the webhook in in order to execute it?
If I uninstall discord, will my bot go offline?
@pine bear no
oh ok, thx
@earnest phoenix no
by package i mean module
but the server needs to have the webhook enabled
if its possible easily by default can you tell me how
@fiery stream doesn't the os package do that?
hmm then im gonna try and see where i did wrong because the message just wont send
i dont think its for that
its for navigation in system
like path n stuff
i just looked at it
Maybe sys?
lemme see that
Idk, probably there's a vanilla python for that
idk thats why im asking someone
Yep, it's os lib
what permissions do i need for overwriting a channel's permission?
CONNECT: false,
VIEW_CHANNEL: false,
SPEAK: false,
})```
```> { DiscordAPIError: Missing Permissions
> at item.request.gen.end (C:\Users\Tower\IdeaProjects\team-up-server\functions\node_modules\discord.js\src\client\rest\RequestHandlers\Sequential.js:85:15)
> at then (C:\Users\Tower\IdeaProjects\team-up-server\functions\node_modules\snekfetch\src\index.js:215:21)
> at process._tickCallback (internal/process/next_tick.js:68:7)
> name: 'DiscordAPIError',
> message: 'Missing Permissions',
> path:
> '/api/v7/channels/718253562836287548/permissions/89607284866428928',
> code: 50013,
> method: 'PUT' }
thx for that effort
what permissions do i need for overwriting a channel's permission?
CONNECT: false, VIEW_CHANNEL: false, SPEAK: false, })``` ```> { DiscordAPIError: Missing Permissions
@proven lantern manage_roles I think
@lyric mountain thanks, let me test that out
It could also be manage_channels together with that one

is it possible to update my bots permission on https://top.gg/bot ? my bot is currently awaiting approval
i guess i could just delete it and make a new submission
Just change the invite url
But note that your bot will first be tested with 0 permissions, so remember to set error messages
ayyy
@lyric mountain good to know
i need a help so when i do print(platform.architecture())
it returns this
('64bit', 'WindowsPE')
how do i get 64bit only
i tried this print(platform.architecture(1))
and it gave me this ('64bit', '')
Use []
[0] will get the first index
with 1 in it
ohk thx
didnt work @lyric mountain
its python btw
ik it works like that in javascript
it didnt work here tho
Is that an array?
If so, do this:
('64bit', '')its that i dont think thats array
bit, arch = platform.architeture
If it's an array this should unwrap them in those vars
i dont think ats an array tho
Out[12]: AttributeError: module 'platform' has no attribute 'architeture'```
i dont think that seems to work
Out[14]: AttributeError: module 'platform' has no attribute 'architeture'```
whats tuple?
im new to py btw
Try bit, arch = platform.architeture()
wait what
There's a C before "ture"
it worked
thats weird tho
is there a way i can make it print within one line
like print(platform.architecture())
that hurts my ocd
can i do it without the bit, arch thing
@fiery stream that bit, arch thing is the unwrapping of the array
but it hurts my ocd
You can just to platform.architecture()[0]
lemme see if that owkr
okay thx very much
Better than ```py
bit = platform.architecture()[0]
arch = platform.architecture()[1]
Up to you
can someone give me the eval script for discord.js 11.5.1
.
if you were to access a property of an object based on an user's id would object[message.author.id] do it?
by default are embed inlined?
@fiery stream you can pass a boolean to the field
ok I tested it is true
not by default, i dont believe
^
CONNECT: true,
VIEW_CHANNEL: true,
SPEAK: true,
})```
I am getting a `DiscordAPIError: Missing Access` error when running this code. The issue happens when the `msg.author` is connected to a different guild than the `channel` is in.
it was well worth it tho
is there a way to give a user permission to a channel in a guild that they are not in?
nope
they must be in that guild
no idea homie
anyone know how to make message.member.role.highest tag the actual role instead of displaying the ID
if u do @ me
mention property or <@&id>
ok let me show u my code tho
.setThumbnail(member.user.avatarURL({ format: "png", dynamic: true, size: 128 }))
.setColor(color)
.setTitle(member.user.tag)
.setDescription(member.user.toString())
.addField("Member User Info", `**Username** ${username}` +
`\n**ID** ${member.user.id}` +
`\n**Status** ${member.presence.status}`, true)
.addField("Server User Info", "**Created** " + created.toString().toLowerCase() + "\n" +
"**Joined** " + joined.toString().toLowerCase() + "\n" +
"**Highest Role** " + message.member.roles.highest, true)```
at the bottom
...ok?
i told you
no
i dont understand what u mean
i dont get it
where the hell do i put it
what u said makes no sense
k
i found nothing
litterally nothing
all it shows me is some stupid bs about showing ALL the roles of a user
thats not what i want
@earnest phoenix
oh wow d.js doesn't have a mention property on the role
just send <@&role id> instead
ok so i do <@message.member.roles.highest>?
Steven
thats what i want
but
where do i put that
After highest because that returns the role, but if you're surrounding it in <@&> just use the id
ok so i think i get what ur saying
message.member.roles.highest.toString()
like that right
Yep
ok tysm
Anything I should be writing in the discord bot's folders to be hosted in uptime robot? I spefify the live app link ( in glitch ), does not work with a specific project but does with others. Is there somethkng I may write innthe bot's project files? ( if this is the correct channel for it )
You what?
How to make bots?
-faq 3 -c
Thx
(thats not a rule btw)
Ah, faq, I'll try to remember that one
Ohh
hey
can a guild invite give permission to a channel
CONNECT: true, VIEW_CHANNEL: true, SPEAK: true, })``` I am getting a `DiscordAPIError: Missing Access` error when running this code. The issue happens when the `msg.author` is connected to a different guild than the `channel` is in.
@proven lantern I was able to fix this by giving the bot admin permission. i tried checking all the permissions besides admin and that doesn't work
works
doesn't work
maybe i need to add scopes?
yes, bot scope
Guys
that's the only scope i have
hmm.
bruh
yes pisces
Well obviously
bot
discord.js is free tho
But need download
It's only free if you make a bot yourself
My pc having a problem
^ and host it
google should work
There are lots of tutorials out there
combine that with the documentation
Is there any language you have experienced with?
only language im really experienced in is scratch 
scratch isn't a language 

Have you checked channel perms?
Because admin bypasses them all
While the others don't
i create the channel like this, msg.guild.createChannel and use that channel
Idk then
how to obtain battery percentage via nodejs
how to obtain battery percentage via nodejs
@misty sigil why would it have a battery percentage?
dont ๐ even ๐ ask
whats heart beat ping
How many milliseconds have passed since last heartbeat
computers dont have heartbeats
Servers do actually
websockets do*
Pls tell me
do bots actually have a server creation limit?
10 servers
ah
Only if your bot isn't in 10+ servers
makes sense
How do i make a random number generator with math.random?
Math.Random() * x
anyone got any idea what Unexpected end of input means
Means your end of input is unexpected. Your end of input could be a } or ) or etc.
Is anyone here familiar with the Tiktok API?
tiktok doesnt have an api
their endpoints are complicated asf and authorization is a bitch
What about this then?
you can make the servers believe you call them from the app but if you fuck up one thing ur acc is bonked
which tiktok scraper does
Alright thanks
color: #FF0000, title: type of error, author: user who requested the command that returned the error, footer: statistics for nerds, description: what exactly fucked up, field #1: the error
@fiery stream
if you dont manage to do it just let it say โerrorโ
k ill try too
why
array of strings, including ๐๏ธ, doesnt include ๐๏ธ
but ๐๏ธ === ๐๏ธ
oh wait nvm seems to be two different types of the emoji
huh
Users : 10 <= how to get only 10 ?
when a user joins the server i am trying to give them permission to join a channel. channel.overwritePermissions is giving me permission issues.
wow that code
I try to make it so that in a message that my bot sends, of the style Number of users: 26 (this is an example) that its retrieves only the number that there is in the message
it makes a perfect 90* triangle
i will organize it once it works
this is the most organized code i have seen lmao
so @fiery stream ?
wait what
I try to make it so that in a message that my bot sends, of the style Number of users: 26 (this is an example) that its retrieves only the number that there is in the message
bruh you copied same thing
explain it bet
Ok
yep, apparently different
better
Lmao
@earnest phoenix get the message parseInt the content with no optional settings it will just get the number back
Example : My bot send a sentence : There are 360 โโusers on your server.
I want to get only the number in this sentence (so 360), but how
get the message parseInt the content with no optional settings it will just get the number back
Ok thx
Can u give me a example ? @small prairie
"There are 360 users on your server.".split(" ").reduce((acc, val)=>parseInt(val) ? val : acc)
there you go @earnest phoenix
thx
you should always write your code on one line
@earnest phoenix is that good enough lol
does channel.overwritePermissions need more permissions than this?
i get the same error with these permissions
this is when i create the invite to the channel and save the userId to channelId mapping
Role hierarchy on the bot?
no roles
Your bot has a role when you invite it
i gave the bot all permissions in the image above
everything besides admin
it works when it has admin permission though
I dont think you can set channel overrides when the bot role is lower than the target role in the roles hiarchy
Nvm u setting channel overrides for user
Can you even set channel overrides to a person that is on a higher role level
Have you tried it on a normal member?
i have a test account that i am using with this
i kick out the test account and then give it an invite. my test account has no special permissions
but i am using my admin account to create the channel
let me try with two test accounts
Could it be a channel permission that prevents it?
oh
so i should give the bot a static role and add it to all the private rooms i create
Or give the bot the member role
Off-topic tip, but you can get the everyone role by the guild ID since they're the same.
Oh yeah, I saw that it was overriding per user. So yeah you could just add the bot to the override
I thought it was a role named member
:+1:
After a few hours of my bot being active it goes offline with this error
Someone help
looks like a certificate issue maybe
oh, nm
does your hosting put instances to sleep after idling for some time?
i think glitch hosting does that
Can someone help me in #topgg-api plz?
why wouldn't this recognize the oldMessage part if it was a message sent before the bot was started?? js client.on('messageUpdate', async (oldMessage, newMessage) => { const definedGuild = await StateManager.connection.query(`SELECT * FROM guildconfigurable WHERE guildID = ${oldMessage.guild.id}`) const definedPrefix = definedGuild[0][0].prefix // if (oldMessage.author.id === `703091048100003891`) return; const updateLog = client.channels.cache.find(dl => dl.id === `708519292907290684`) if (oldMessage.guild.id === `708514630204522574`) { console.log(deleteLog.name); const embed = new MessageEmbed() .setTitle(`Message Deleted`) .addField(`Old Message:`, oldMessage.content, true) .addField(`New Message:`, newMessage.content, true) .addField(`Message Channel Name:`, oldMessage.channel.name, true) .addField(`Message Channel ID:`, oldMessage.channel.id, true) .addField(`Message Author tag:`, oldMessage.author.tag, true) .addField(`Message Author ID:`, oldMessage.author.id, true) .setThumbnail(oldMessage.author.displayAvatarURL()) .setFooter(process.env.FOOTER) updateLog.send(embed) } });
(node:29800) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tag' of null
but if I update a message after I restart the bot it works just fine...
oldMessage.author must be null for some reason
but oldMessage.channel.id is not null
let me try newMessage.author
which the oldMessage.author would be wouldn't it?
is it possible to create an invite to a guild that doesn't go to a channel? like guild.createInvite() instead of channel.crateInvite()
no
shucks
somebody helped me get it ๐ I just had to fetch like you said. Thanks guys
my invite is sending the user to a channel they dont have permission for initially. the guildMemberAdd listens for them to join and then gives them permission to join the channel, but they are in a bugged out state because they are already in the channel. they have to join a different channel and then join the channel again to get out of the bugged out state
should i just look for a public channel and give them an invite to that channel?
then move them to the private channel after they have joined
does your hosting put instances to sleep after idling for some time?
@proven lantern na as i host a game server on it as well. and itโs a VPS
That's how any normal invite works
You invite someone to a channel
You cant have a server with 0 channels to view
Or shouldn't.
Dont you have an announcement channel you could use instead?
@turbid bough this bot will be in guilds that i dont own so there might not be a public channel, but i think i can just make that a requirement for people
Ayy is it possible for py bot to not create py cache
You could try searching for existing invities
i'm thinking about iterating over the guild.channel and finding a channel with @everyone permissions
invite them to the public channel. they join and then my bot gives them permission and then moves them
is there more code to see?
It's the code from #312614469819826177
have you tried scrolling down on that channel
No y
try doing that and read what it says
What will i put at the first
Oh it worked
email them
no
learn coding
learn a programming language
may i ask how to create channels with discord.py?
i want to make a ticket command
read docs
@pale vessel y aren't u a mod my guy
Oh tuff
pretty much if you read docs you'll find it instantly, horror
both are easy to navigate if you're used to them
they should be
Hey what is this ```CSS
const express = require('express');
const app = express();
const port = 3000;
app.get('/', (req, res) => res.send('Hello World!'));
app.listen(port, () => console.log(Example app listening at http://localhost:${port}));
Guys
What this
const express = require('express');
const app = express();
const port = 3000;
app.get('/', (req, res) => res.send('Hello World!'));
app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`));
that is an example app
What do i put
i dont do at node
so if you go to localhost:3000 in your web browser you should see the message defined above
I mean
you can make a bot application
I am new
you can make a webserver
I recommend going to read/watch tutorials prior
^
Can you tell me
no
Why you so mean
no
Because people don't have the time or patience to sit here and spoon feed, it's not as simple as just "telling you". Go watch/read tutorials and you'll gain a deeper understanding easier.
Watch/Read where
YouTube, google some shit. Idk, it's been years since I went looking for tutorials
is there an event that is triggered when a user connects to a voice channel or reconnects to a guild(not just the initial connect)?
reconnects to a guild(not just the initial connect)?
?
when they click the guild from the guild list on the left side
huh
the vc is still connected if you open other guilds
ayy
is there a guild focus type of event
how do you check if text exists
in python
if (!word)``` i got that of now i thought it worked just like js
AttributeError: 'Bot' object has no attribute 'is_voice_connected'
how do i fix this?
discord.py btw
voiceStateUpdate should work for when a user connect to a voice channel
where would i put that
async def play(ctx, url):
if not bot.is_voice_connected(ctx.message.server):
voice = await bot.join_voice_channel(ctx.message.author.voice_channel)
else:
voice = bot.voice_bot_in(ctx.message.server)
player = await voice.create_ytdl_player(url, after=toggle_next)
await songs.put(player)```
this is where im getting the error
.addField(":hypesquad: `-` **Nickname:**", `${target.nickname ? `${target.nickname}` : "No Nickname"}`,inline, true)
Why this returns as "No Nickname" even if i have a nickname ?
````${target.nickname ? target.nickname : "No Nickname"}```
you have extra `` `
actually that should still work
idk
haha
// Flute gang: https://discord.gg/flute
I made all the music & visuals.
Support the song here:
// https://spoti.fi/2tTmOtK
// https://soundcloud.com/exyl_sounds/ping
// https://www.newgrounds.com/audio/listen/900250
// https://music.apple.com/ca/album/ping-single/id149...
F
@proven lantern or you can just target.nickname||"No nick"
ayy
Any developers help ?
You can just ask your questions here and if people are able to help you they will ^^
@dawn trout what do you want to do
Bot
client.channels.size
error ans in server says undefined
What version of Node.js should i install
Latest LTS
Latest?
It starting
Congrats
how do i create channels with discord.py
What does this mean?
parameter: cache type: boolean default: true Descrioption: Whether to cache the message(s)
If I don't use false there it will not fetch unchached messages?
how i can get this :
Visual Studio Code | Workspace: Bot Cool (Workspace) - Playing
when i use this :
.user.presence.activities
it display only vscode
not displayed Workspace
console log the whole .user.presence maybe there's more info on there
ok. . . .
also, do you console.log the activity or send it
cause if you send it, it gets .toString()ed
it's an object and there's more data on it https://discord.js.org/#/docs/main/stable/class/Activity
What do you mean? Like in languages?
@earnest phoenix yeah
Guys the Discord API is too difficult for me
yes
and now i am leaving
cause
my bot got hacked
I need to use Bot Designer
HOLY...
577 PING
How do I make my bot search up something and post it as a image
make it an attachment
Wdym by tht?
Or you can put it in an embed
do you want it to be in an embed?
Nope just a image
just use new Discord.MessageAttachment(link, name);
Qui veut รชtre ajouter au serveur le plus actuel etc... du Discord que je lui envoie le lien !
Who wants to be added to the most current server etc ... from Discord I send him the link!
@slow zodiac That is self advertisement
oof
Name can be whatever
So what if I do the cmd does it search it up
@slow zodiac That is self advertisement
@earnest phoenix Yes ((logique))
you have to search for the image first
Ohhh
you should have the link right?
Yes
You working with js or?
yes
but how come some other bots do like !search meme and it gets it from the internet, or are they using link and things???
you got it from the internet no?
You can use modules for that
@pale vessel yes the links but let's say aeon u know how u do the twiiter thing to get a pic of ollys tiwwter
you need modules for that
Oh
but all of them use the same concept, attachments
Oh alright
var input = "412414337848967181"
if (input.some(Check => bot.guilds.map(r => r.id).includes(Check))) {
var GuildGet = bot.guilds.get(input)
console.log("")
console.log("Name : " + GuildGet.name)```
```TypeError: Cannot read property 'name' of undefined```
input must be an array
@wicked pivot what's input supposed to be
you're using some, which is an array method
var input = [ "412414337848967181" ]```**
yes
this is already what i just badly copy sorry
oh
how can you copy those without the [] lul
anyway, have you tried restarting your bot
and oh
some returns a boolean
not the object
you should use the find method
okay i try
all good mate
hey. can anyone help me. im wanting to make moderation commands for my bot but dont know how. tried tutorials online but none have worked so far.
what language
so i made this simple script with my bot https://cdn.lumap.me/z1mf21dv.png but every time a message is edited this happens https://cdn.lumap.me/pzxj9uvv.png . Any idea why?
(ignore first line of my code)
K nvm figures out embeds r shit
Do I have to loop trough every guild to get the total member count?
FATAL ERROR: v8::ToLocalChecked Empty MaybeLocal.
please help me
Do I have to loop trough every guild to get the total member count?
@opaque seal yes
How can I see the active/inactive shards of my bot?
is there a simple method in discord.js?
@earnest phoenix where does that error come from?
@opaque seal wdym active/inative
@quartz kindle i dont know i change vds after show this error
So if them are online or offline @quartz kindle
are you using the sharding manager?
no
i meant giulio
@earnest phoenix that error happens with native c++ modules in node.js
are you using node.js?
yes i using node.js
Okey wait
{
"//1": "describes your app and its dependencies",
"//2": "https://docs.npmjs.com/files/package.json",
"//3": "updating this file will download and update your packages",
"name": "hello-express",
"version": "0.0.1",
"description": "A simple Node app built on Express, instantly up and running.",
"main": "server.js",
"scripts": {
"start": "node server.js"
},
"dependencies": {
"better-sqlite3": "^7.0.1",
"chalk": "^4.0.0",
"dblapi.js": "^2.4.0",
"discord.js": "^12.2.0",
"express": "^4.17.1",
"generate-password": "^1.5.1",
"jimp": "^0.10.3",
"moment": "^2.25.3",
"moment-duration-format": "^2.3.2",
"ms": "^2.1.2",
"node-gyp": "^7.0.0",
"node-superfetch": "^0.1.10",
"novelcovid": "^1.2.7",
"os": "^0.1.1",
"parse-ms": "^2.1.0",
"quick.db": "^7.1.1",
"random-puppy": "^1.1.0",
"request": "^2.88.2",
"request-promise-native": "^1.0.8",
"return-deep-diff": "^0.4.0",
"simple-youtube-api": "^5.2.1",
"snekfetch": "^4.0.4",
"speedtest-net": "^2.1.1",
"sqlite": "^4.0.10",
"tdbapi.js": "0.0.3",
"weather-js": "^2.0.0",
"windows-build-tools": "^5.2.2",
"ytdl-core": "^2.1.2"
},
"engines": {
"node": "12.x"
},
"repository": {
"url": "https://glitch.com/edit/#!/hello-express"
},
"license": "MIT",
"keywords": [
"node",
"glitch",
"express"
]
}
created package.json-lock
this is on glitch?
using packege.json-lock
@earnest phoenix
yes i dowland glitch project
@earnest phoenix i assume you mean package-lock.json
and paste vds
you should delete anything that your bot doesnt need
Okey wait
So steps to do: Remove every package you dont need from the package.json file, delete node_modules and package-lock.json and npm i
to also make sure every package you need is on the newest version
or just delete package.json as well and run npm init lol
I deleted now write npm i?
npm i in your terminal, that is navigated into that folder
he deleted his package.json as well
fck
do npm init first
show errors
I write npm i but
I'm still getting module error
did you run npm init first
i write npm init
{
"name": "guardian-bot",
"version": "0.6.3",
"description": "Guardian Bot",
"main": "server.js",
"scripts": {
"test": "node server.js",
"start": "node server.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"discord.js": "^12.2.0"
}
}
and npm install discord.js
good
okay, but you need to manually define the modules you want because you annihilated your package.json before
now when you have a module error
that says module not found
you need to npm i THATMODULE
okey
if you want multiple modules installed at once you can just npm i module1 module2 module3 etc
ye but the errors will only show one at a time
he copied his entire code base and has no idea which modules he needs
you can just look into the main.js file and look
@quartz kindle @earnest phoenix Thanks for help :)
Thanks
but how do I get the old data?
old quick.db data
you need the database file
i dont know how quick.db saves it, its something like database.sqlite
are you using the sharding manager?
@quartz kindle yes
you can probably broadcastEval the websocket statuses
client.ws.status gives you the websocket connection status
im not sure what broadastEval returns when the child process is disconnected, you'll have to test that
Quick question: What does a code grant do? Does it involve with a Discord OAuth2 or...
im pretty sure it is related to...
How to send someone personal dm with his id?
@surreal notch get user from client and send message
using mongoosejs, does it matter if u use the same db collection and same model for two different projects
like the code thing
no u don't
like if you enable code grant: do you need to make another website to verify your code?
like
when you do a discord oauth2
it has a ?code=
yes
i don't think so, no
then you can invite the bot?
A small calculator that generates Discord OAuth invite links
Hello.guy
I'm trying to make a set log channel command for my bot as it has logs in just no way to select the log channel,
I'm not sure how I would do it, Would i put set.serverlogchannel after my bot checking for the right permissions and ignoring the command from a bot
(to set the channel the command was used in to the log channel) tag me please when answering
just use the channel id and store it in a json
and send messages to that channel
wut? so?
Which library?
<client>.user.setActivity()
yes
in ready event
yes
im getting a weird error that bot isnt defined, what do i put insted of bot?
^
ReferenceError: bot is not defined
at Client.<anonymous> ```
Whatever you defined your bot as
so client?
yes
tysm my bot powered on
it says its not a function when i dont want to use a function :-;
(client.hasPremission isnt a function)
@summer torrent still not a function
ie if you do bla = new Discord.Client() then you do bla.user.setActivity()
@earnest phoenix
ie if you do bla = new Discord.Client() then you do bla.user.setActivity()
^
||I will not ping you i think||
@still merlin client doesnt have a hasPermission() method, members do
I like this server

๐
i wanna store emojis as settings and they get stored as utf-8 strings, is there any way i can turn that back into an emoji i can use in message.add_reaction() btw i use python
Is there a way of checking if my bot has premissions for something
discord.js
ah ok nvm me
yeah but is it being stored in a file
like when i paste it into a json file it auto becomes a utf8 code, and when i try adding that utf8 code to a message as a reaction i get an error
so like how would i add this as a reaction to a message \u274c
does anyone know if u can use the same mongoose model for two projects?
yes
interesting
when i use the temp model, my discord oauth2 works perfectly fine, and when i use the main model, it takes around 15 minutes to load, and when it eventually does i get an error
InternalOAuthError: Failed to fetch user's guilds
both models include the id of the member, the only difference is the main one, includes more info
btw this is my error
@digital ibex you can definitely use the same model, i use 1 schema in 4 commands that save to a web dashboard
then do u kno why thats happening to me?
ive had this issue for 3 days and havent got any closer to resolving the issue since i first got it
im guessing youre making a login system?
thats odd
and they are all the same right?
the models?
yeah
const data = ops.active.get(msg.guild.id) || {};
if (!data.dispatcher) Play(bot, ops, data);
else msg.channel.send(`Queued ..');
The !data.dispatcher-if statement keeps returning true
no, the main one holds more info, while the temp one (one which works), holds only the users id
lemme show u them
it may be that the main model collects user servers
but it cant get that info and then errors
i wanna store emojis as settings and they get stored as utf-8 strings, is there any way i can turn that back into an emoji i can use in message.add_reaction() btw i use python
@earnest phoenix why utf8? just store them as they are
it gets automatically changed to utf8 when i put it into a file
i found this https://stackoverflow.com/questions/48691051/converting-an-emoji-javascript-unicode-code-to-utf-8
try it and let me know ;P
thats in javascript
python
hmmm
and no problem
https://hasteb.in/isupihiw.js @honest perch
the link is the main one, which doesn't work, and the picture is the temp one, which works
python
@earnest phoenix https://stackoverflow.com/questions/47716217/converting-emojis-to-unicode-and-vice-versa-in-python-3?rq=1
not sure tho
@digital ibex
the main model doesn't collect users servers
i think my problem is something else, ill do some testing for a bit
k ๐
@honest perch any ideas?
not really sure tbh as ive only recently tried mongo, maybe someone more experienced can help
kk, thanks anyways ๐
hello anyone know why my discord music bot wont disconnect after song
here is the code case 'stop':
case 'st':
var server = servers[message.guild.id];
if(message.guild.voice.connection){
for(var i = server.queue.length -1; i >=0; i--){
server.queue.splice(i, 1);
}
server.dispatcher.end();
message.channel.send("ending the music ladies and gentlemen!")
console.log('ended the music!')
}
How to make a prefix variable and allow people of different sevr I s to change it ?
Currently my prefix is s!
store a db
but anyone know whats wrong with my coding, if there is anything wrong on why it wont disconnect
You Discord.js version
me or him
FrezzaTv
here is the code case 'stop':
case 'st':
var server = servers[message.guild.id];
if(message.guild.voice.connection){
for(var i = server.queue.length -1; i >=0; i--){
server.queue.splice(i, 1);
}server.dispatcher.end(); message.channel.send("ending the music ladies and gentlemen!") console.log('ended the music!') }
@signal viper not disconnecting? connection.disconnect(); try this
copy your code @ancient lichen ?
oh im dumb xD
LUL
btw try connection.disconnect();
obw connections is the promise given by channel.join
will look and ty btw
k
nope gave me some mad error is visual code xD
case 'stop':
case 'st':
var server = servers[message.guild.id];
if(message.guild.voice.connection){
for(var i = server.queue.length -1; i >=0; i--){
server.queue.splice(i, 1);
}
server.dispatcher.end();
message.channel.send("ending the music ladies and gentlemen!")
console.log('ended the music!')
}
if(message.guild.connection) message.guild.voice.connection.disconnect();
break;
thats the full code for stop
how do i check if my bot has permission? I tried me and its undefined still
^
ReferenceError: me is not defined
at Client.<anonymous> (C:\Users\Jon\Desktop\SpiderBot Project\index.js:489:7)```
me would be a variable in your code above.
On a guild instance, you can access the .me property for the bot in the guild.
<Guild>.me
message.guild.me
is there a way to clear cached messages ?
no
sad story
my bot is still dying
my bot is still dying
@signal viper make it live
๐ง
this has been bugging me all day, How do I check if my bot has permissions.. my existing one is below and I get a error ;-;
^
TypeError: message.guild.me is not a function
at Client.<anonymous> (C:\Users\Jon\Desktop\SpiderBot Project\index.js:489:26)
at Client.emit (events.js:224:7)```
me is not a function
.hasPermission
Kyoka where do i put that thought
i'm not kyoka
Kyoya*
nice try
haha
a guy pinged everyone
but everyone ping is disabled here
you just pinged a guy
also, no spam
stop splitting messages
what if a bot decides to mass ping everyone
say it all in a single msg
No u
what if a bot decides to mass ping everyone
@wind veldt they can't
Oh ok great
what part of "everyone ping is disabled on this server" didn't u understand?
No I mean mass mention everyone induvidually
only admins can ping everyone
that'd by far ratelimit the bot
and mods would ban both the bot and the owner for that
that's called spam bots
and they aren't approved at all on top.gg
so it's quite safe here
yep
can someone help me?
I made a shop command
and the bot sends the embed 2 times
here is the code ```js
if (cmd === "shop") {
const shopEmbed = new Discord.MessageEmbed()
.setColor('#00a6ff')
.setTitle(':shopping_cart: SHOP :shopping_cart:')
.setDescription('Ranks:\n `1#` | ' + `${mvprole}` + ' `' + `${mvpprice}` + '` \n `2#` | ' + `${viprole}` + ' `' + `${vipprice}` + '` \n Colors: \n `3#` | ' + `${bluerole}` + ' `' + `${blueprice}` + '` \n `4#` | ' + `${redrole}` + ' `' + `${redprice}` + '` \n `5#` | ' + `${greenrole}` + ' `' + `${greenprice}` + '` \n `6#` | ' + `${yellowrole}` + ' `' + `${yellowprice}` + '` \n `7#` | ' + `${aquarole}` + ' `' + `${aquaprice}` + '` \n `8#` | ' + `${blackrole}` + ' `' + `${blackprice}` + '` \n `9#` | ' + `${pinkrole}` + ' `' + `${pinkprice}` + '` \n \n Type `m!buy (number of the role)` to buy a role')
.setAuthor(sender.username, sender.displayAvatarURL())
msg.channel.send(shopEmbed);
}```
see if you haven't created two clients
nope
if you use another command does it send only once?
lemme check
i now tried help command
and it sent it 3 times
bruh
wtf is happening to the code
help
you're creating more than one client
show whole code
(in hastebin.com obviously)
how do i fix this python bug:
When I try to get the video title of a youtube video with beautiful soup and requests in python sometimes it just returns the string "YouTube" instead of the title
this is my def
def get_video_name(url_id: str) -> str:
r = requests.get(f'https://youtube.com/watch?v={url_id}')
r.raise_for_status()
soup = BeautifulSoup(r.content, "lxml")
return soup.title.string
how do i fix this python bug:
When I try to get the video title of a youtube video with beautiful soup and requests in python sometimes it just returns the string "YouTube" instead of the title
@earnest phoenix code plz
just sent my code
do you have the request response?
ok
maybe it's not soup.title.string
um
so
my warn command
sends a member a warn
in dm
but
if their dms are closed
it cant send them
how do i fix that?
or
should i say
how do i get around that
fricc
not getting dms
setTimestamp is a function
Is that the problem?
quick.db. I know its bad, but how come this errors? I have the recent version ^7.1.1. (node:9626) UnhandledPromiseRejectionWarning: TypeError: db.startsWith is not a function
yes
https://hastebin.com/amoxiledac.xml @lyric mountain this is what i get when i do print(soup)
its literally just youtubes html
so, you're scrapping the site?
and it is soup.title.string because sometimes it actually returns the appropriate title.
i mean kinda
wouldn't using their api be easier?
WHAT
Regenarte
that's no token dude
It s
quick.db. I know its bad, but how come this errors? I have the recent version ^7.1.1.
(node:9626) UnhandledPromiseRejectionWarning: TypeError: db.startsWith is not a function
@astral yoke startsWith was removed
that bin is youtube's html
what was it replaced with? @summer torrent
ik
regenetated token
or was it just removed entirely?
@earnest phoenix Good
you can create your own function using db.all()
why would you publicly put my "token" in this chat