#development
1 messages Β· Page 1714 of 1
roles is a Collection<string, Role>
Collection<K, V>.includes is not a function
if you strictly want a boolean for if the Collection has a key, use Collection.has(key)
Where key in this case would be the role ID
had set key to the string id role
what is the value of the reference which displays as (intermediate value)
log it to the console to find out
oh wait
it would be roles.cache.has
I keep forgetting v12 changes since I use v11

agree
how do i make this work?
Hello, i'm trying to add a verification to one of my events, but didn't found a way to do it.
In my guildMemberUpdate.js everytime a role is added/removed to a member, i save it into a collection with the role name + guild name and the list of members with the role, it look like
client.backup.set(guild.id + role.id, userdata)
[
{ memberID: '77288827', roleID: '737838838' },
{ memberID: '7377927', roleID: '737838838' }
]
and in my roleDelete.js I made that from 2 role delete it recreates the role and it gives it to the person who had it, except that with 1 role it works perfectly, but with 2 role, it takes the members of the 2 array and I know not how to check since the role id to recreate is different from the one in the collection
My roleDelete.js
// Annulation des modifications
await backup.map(async r => {
const data = {
name: r.role.name,
color: r.role.color,
position: r.role.rawPosition,
permissions: r.role.permissions,
hoist: r.role.hoist,
mentionable: r.role.mentionable
}
var oldRole = await guild.roles.create({ data: data, reason: 'Anti-Role Enabled' })
let results = client.backup.get(guild.id + role.id)
results.map(m => {
guild.members.cache.get(m.memberID).roles.add(oldRole.id)
})
})
Sorry for my english i'm french
The error come from results.map() he doesn't check if the new role id is the same as the deleted role, but it can be the same
Use the @client.event decorator with an on_command_error name to handle the event. See https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.on_command_error
also, id is already a string, no need for toString()
also fetch returns a promise, Promise.roles is undefined
oh ty!
Hello, I am making a website, and for some reason, one of the divs is over flowing as shown in the image below. Here's the code: https://codesandbox.io/s/mathical-xy2ys
so i changed it to this but it doesn't work either
he doesnt even need to fetch smh 
but yes what you said
Why tf ctx named error and the error named errors? Also, an instance of an object won't equal a class type unless the __eq__ method is overridden. Also, I don't see channel is defined.
well i started with "also", meaning to complete what you already said
:3
if there are 3 wrong things, i like pointing them all out, even if one fix would fix all 3
oop alr, sorry.
what am i doing wrong this time 
there i fixed it by initalising it before the switch
dont get what was wrong tho
Channel#updateOverwrite(message.guild.roles.everyone, { MANAGE_WEBHOOKS: false, MANAGE_CHANNELS: false, MANAGE_PERMISSIONS: false });
MANAGE_PERMISSIONS doesn't work, what is the correct setting?
MANAGE_ROLES ?
yes thx
π
That's not the same type
I return
resultArray = strictProbability(results, amount, batches, limit, bottom);
for (int i = 0; i < resultArray.size(); i++){
count = count + resultArray[i];
std::cout << count << '\n' << resultArray[i] << '\n';
}
resultString = std::to_string((count/resultArray.size())*100) + "%";``` if result array has 3 floats of approx 1/3 shouldnt i not get a huge number printed out
Show us your function declaration for quantity
ehhh thats not my issue rn
rn i dont get why its adding wrong
Resultarray is a vector isn't it lol
yes
c++ gets funky when you put random shit into an int
it's not random tho
It just truncates
anywa learn ranged for loops with vectors
Like js
for(auto v: resultArray) {
count += v;
}```
interesting
dont have time rn
i gotta finish this
record and edit a video on it
shower
what lmao
can you make a element fade out by id?
Make sure to give us some credit lmao
uuh doesn't that method only support Query Params
like ?a=...&b=...
make sure the content type is set to url encoded too
yeah?
error and code
did you restart ts server?
no
wdym then
restart vscode
kk
hello
if(message.content === "-fact"){
let f = args.join(" ")
if(!f)
return message.channel.send("pls verify args")
const facts = Math.floor((Math.random() * activities.length))
message.channel.send(`**${f}** :- ${activities[facts]}`)
}
It's giving me an error args not defined!
The error is telling you what's wrong
and it should be obvious to you how to fix it
hi
Hi
did you do npm publish ?
yes
show your repo field in package.json

but
it still doesn't show up on my repo
wait it does now
wait
I didn't add this
was it important?
wait
so now I have 2 packages?
one is named random-stuff-api
and other is @pgamrexdev/random-stuff-api?
because this
i want this https://cdn.discordapp.com/attachments/serverid/channelid/file.png link to link
Rust question:
I have this field of a struct:
pub on_output: &'a dyn Fn(i32, OutputType)
but how do I call it?
self.on_output(...);
gives me a field, not a method error
ok
wtf
(self.on_output)(...) works
Type overloading tm
Or well
Funky attr logic
If you have a field you can make a function called the same thing
Rust decerns the two same named attrs via the call
With more advanced impls this can also become many functions on one name creating that type overloading style
The (self.attr)() is basically telling the rust compiler, trust me its a normal attr that im just calling
Interesting callback thoufh 
I'm writing a befunge interpreter :x
Its alright for simple stuff ig
If i had more callbacks or tbh i would still do it to stop lifetime issues should you want to pass the struct around
Make a trait
Just have it as a impl foe the type
url = message.attachments.first() || message.Attachment.proxy_url```
```TypeError: Cannot read property 'proxy_url' of undefined```
anyone help me plz
`throw new DiscordAPIError(request.path, data, request.method, res.status);
^
DiscordAPIError: Invalid Form Body
embed.description: This field is required
at RequestHandler.execute (/home/ubuntu/secret/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
`
There is no Attachment prop in docs
.setDescription(...)
which command/file
req.client.states[req.query.state] any reason for it to return Cannot read property 'no' of undefined
\
Where you create embed new MessageEmbed( { description: ... } ).setDescription( ... )
-_-
π
?
use this before the emoji you will get id just use it
yeah
BRUH
remove > maybe
then what is this const emoji=message.guild.emojis.cache.get('793555548196700221');???
message.Attachment[0].url
TypeError: Cannot read property '0' of undefined
i have more then 30 commands 
i have 10 command
message.attachments
i need attachments url to url
Array of urls?
like https://cdn.discordapp.com/attachments/272764566411149314/833943669920497674/Screenshot_2021-04-20_at_11.24.18_AM.png attachments
url
got?
@still sky
like me send image attachments link
not bot send
bot need fetch my link/url
let embed = new discord.MessageEmbed()
.setTitle(`*Here are my commands!*`)
.setColor(AllEmbedsColor)
.setTitle("HELP")
.setDescription("**commands**")
.setFooter(`Requested by: ${message.author.tag} `);```
If you dont have message.attachment.first() then there is no attachments i think
not attachment link You mean where user just sends link?
like https://images-ext-2.discordapp.net/external/pibLYeIxFOk59uEuxQgcRQ95cUf7P1uoeY2aOOCLiEI/%3Fwidth%3D224%26height%3D300/https/media.discordapp.net/attachments/815951481823297569/833948438244098058/34d051688ea8d1019506802362bfd5a9.jpg or https://cdn.discordapp.com/attachments/272764566411149314/833943669920497674/Screenshot_2021-04-20_at_11.24.18_AM.png
yup
Then you should parse message.content or message.embeds[].url if its exist
@still sky
i need work with link or both
got it?
i using if (message.channel.id !== "815951481823297569") return; if (message.author.bot) return; var url; url = message.attachments.first() request(url, async function(err, res, body) { if (err !== null) return;
You need to test message for all kinds: attchmts, urls, embeds to be sure
i need without embed
yay
i did it
it write out custom emoji
const emoji=client.emojis.cache.get('793555548196700221').toString();
@earnest phoenix hey listen
say
I Know U Maded Happy Bot But How Did U Done That Vote Data Sending On Discord Using A Webhook?@earnest phoenix
For Python?
weit
Its For Js I Guess
u need top.gg api "uske lie tera bot wha hona chahiye"
then?
weit
@earnest phoenix ^
@earnest phoenix what is 'dbl_token' And /dblwebhook?
if(command === "troll") {
if (message.channel.type == "dm") return;
message.channel.bulkDelete(1);
const emojie=client.emojis.cache.get('808733922376548402').toString();
message.channel.send(emojie);
}```
error:
const emojie=client.emojis.cache.get('808733922376548402').toString();
^
TypeError: Cannot read property 'toString' of undefined
But why it cannot read?
and find token
it's dblwebhook?
get('id')?.toString() -- for node 14 above
And Its Bot token? Am i right?
top.gg bottoken
got?
top.gg bottoken and bot token are different?
yup
@livid jackal go corona π
Hm
I Hope My Bot Verify Soon
;_;
@earnest phoenix can u come vc
ok
which onem
done
ok
throw new DiscordAPIError(request.path, data, request.method, res.status);
^
DiscordAPIError: Cannot send an empty message
at RequestHandler.execute (C:\Users\user\Desktop\discordbot\node_modules\discord.js\src\rest\RequestHandler.js:154:13)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
at async RequestHandler.push (C:\Users\user\Desktop\discordbot\node_modules\discord.js\src\rest\RequestHandler.js:39:14) {
method: 'post',
path: '/channels/831498979736813578/messages',
code: 50006,
httpStatus: 400
}```
bruh
?. returns undefined on fail, you can't send undefined
says cannot send an empty message
hmm
you should check if get('id') will return undefined
and can you tell me how? : )
you should do something like if(!emojie) return
thx
Why This Is Error?
read the error
await must be in async
yes
Ohh Ok
wait
bruh
i can't write out 808733922376548402 emoji but i can the 793555548196700221 emoji
:/
can someone help me with my member count command?
Whenever i run it it will say undefined members heres the code
module.exports = {
name: "membercount",
description: "test command",
async run (client, message, args) {
const membercount = new Discord.MessageEmbed()
.setColor('#0099ff')
.setTitle(`There are ${message.guild.membercount} members!`)
.setTimestamp()
message.channel.send(membercount);
}
}```
memberCount
oh
camelCase
hey it works now
enough testing for today
Cannot access 'client' before initialization i keep getting this error suddenly
the client is used before it's being set
const x = x
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
async function getVidDesc(vidId=["dQw4w9WgXcQ"]) {
var retA = [];
var retB = [];
vidId.forEach((v,i)=>{
retB[i]=ytdl.getBasicInfo(v);
});
return retB
};
getVidDesc(seResIds).then((vv)=>{Promise.all().then((v)=>{
console.log(v);
v.forEach((va,i)=>{
seRes[i]=seRes[i].replace("%desc",va.videoDetails.description)
})
}).catch((err)=>console.error(err))
why
like i get the error at the line wih promise.all
wait what Promise.all()?
guessing code goes brr
i see
you didn't even pass arguments
15 I guess
sudo npm cache clean -f
sudo npm install -g n
sudo n latest
This is my command handler but im still trying to add aliases
const Discord = require('discord.js');
const client = new Discord.Client();
const { prefix } = require("../config"); // Load the config file
module.exports = class {
constructor(client) {
this.client = client;
}
async run(message) {
// If the message author is a bot
if (message.author.bot) {
return;
}
// bind client
let client = this.client;
// Check if the bot was mentionned
if (message.content.match(new RegExp(`^<@!?${client.user.id}>( |)$`))) {
// return prefix info
return message.reply("My prefix is " + prefix);
}
// Gets the prefix
let prefix1 = getPrefix(message, prefix);
if (!prefix1) {
return;
}
let args = message.content.slice((typeof prefix === "string" ? prefix.length : 0)).trim().split(/ +/g);
let command = args.shift().toLowerCase();
let cmd = client.commands.get(command);
if (!cmd) return;
try {
cmd.run(message, args);
} catch (e) {
console.error(e);
return message.channel.send("An error occured ...");
}
}
}
/* Gets message guild prefix */
function getPrefix(message) {
if (message.channel.type !== "dm") {
if (message.content.startsWith(prefix)) {
return prefix;
} else {
return false;
}
}
}``` can someone help??
btw you can do message.mentions
instead of matching with regex
and when you match with regex you dont need to do new Regex but you just can do .match(/regex here/)
let ping = Date.now() - message.createdAt;
return message.channel.send(`Bot Ping: ${ping}`)```
How do i add db ping in this
Im using mongodb
Seems like you didn't set ('help', ...)
Anyone??
Add any request mb? idk
How?
const start = Date.now()
// async request
const ping = // calc somehow
How?
okk
let start = Date.now();
let user = await User.findOne({id: message.author.id})
let end = Date.now();
let ping = end - start;
return `DB Ping: ${ping}`
``` Is this good?
I see you assign all commands above client.commands.set(cmd.name ... and help command doesn't pass here
Worked thanks
@tepid agate u should Delete this image
Your token is visible in that
Its dangerous to reveal your token in public

if getting help please only include enough code to determine problem
and hardcoding bot token is not a good idea
so how can i pipe a videostream (ytdl) to http response in node js
stream.on("end", () => res.end());
stream.pipe(res)
it does only display this in the browser
my code```js
res.writeHead(206, "", { "content-type": "video/mp4" });
var stream = ytdl(whatGetArrKey["v"], { "quality": "highest"})
stream.on("end", () => res.end());
stream.pipe(res);
try adding a content-length header
is the content-l3enth header in seconds?
It's in bytes lol
I mean, you can't really know the size until the stream ends, no?
hmm
but then how can i set it to the header?
my code is ```js
ytdl.getInfo(whatGetArrKey["v"]).then((v1) => {
var stream = ytdl(whatGetArrKey["v"], { "quality": "highest"})
res.writeHead(206, "", { "content-type": "video/mp4", "content-length":stream.readableLength});
stream.on("end", () => res.end());
stream.pipe(res);
}).catch(console.error);
Can someone please help me keep my bot online?
dont turn your pc off
get a stable host
Know how a program works
Really?
yeah
get a stable host
well then dont host it on your pc
Its never suggested to host your bot on a PC
why btw?
bruh
Will it still work if my laptop on lock mode?
like what could happen if i host it on my pc
Well first it takes performance, if it turns off bot turns off, and if you lose power your bot turns off
Essentially your bots uptime depends completely on your PCs uptime
Which is honestly a waste to keep a PC online idling just to host a bot
true...
@sinful trellis you could get a raspberry pi
Seriously?
@sinful trellis there are some cheap host with panel to host your bot
you could get a raspberry pi
^
I saw that already.
Same thing...
like how much does a raspberry pi consume power
Bruh
Much less than a whole PC π
bruh7
also if you dont pay internet bill.. rip bot 

"how much power does the queen have"
@sinful trellis #development message
some cheap bot hosts
oh
wrong pin
bruh

5 watt per hours
Thanks.
well thats 13,62β¬ if you take a price per kilowatt of 31,89 cent
pretty cheap
per year
i have bouth a motherboard with a intel celeron j4125 soldered on it, the cpu consumes like 10 watt per hour. i want to use it as a NAS, but i dont have money for the psu so i use a 600watt psu which i bouth few months ago... like 600watt for that is such a waste
wait he is using some botcreator app?
dafuq is that
Search the internet mate.
If you want your bot to stay online 24/7 there's a good chance you'll have to pay something eventually. Hosting on free locations is usually not stable, so your bot would go offline in some circumstances. If it's on a local machine, then it'll shut down if you lose power. If it's on a free online host, you're going to have the occasional issue with that service going down, or blocking you.
You get what you pay for, and the cheaper you are on bot hosting, the shittier it's gonna be.
bruh
i pay 2 euro for 1 gb ram and 5 gb storage 
i pay 2.75 usd for 1gb ram and 15gb ssd
I pay about $20/month for my hosting right now but it's because I throw the occasional game server on there (minecraft, factorio, 7 days to die, etc). But I used to pay $3.50/month for a half dozen bots and a couple websites. Β―_(γ)_/Β―
im ok with 5 gb storage
That's capitalism π
same, if i add my mc server the price goes to 10,75 euro
how can i get this to work?, it doesnt trigger, or error it sends the commands output but it doesnt check to see if its the channel its allowed in
let game = "834016762986496032"
if (message.channel.id === "834016762986496032") {
return message.channel.send(
`Sorry But You Cant Play **Would You Rather** Here Go To The Proper Channel; <#${game}>`
);
}
.-.
I'd assume it doesn't do anything because your channel ID isn't exactly the right one?
I think you have your condition wrong here...
You want !==
=== means "EXACTLY EQUAL TO"
Not ===
this
Lol
That's a great place to learn I'm sure.
Code.org is also real good to start off with.
You're using that to code a discord bot?
No.
Guys don't start fucking shaming this dude for taking the time to learn, ffs, that's what we want people to do.
i didnt said that its wrong to learn
i mean everyone once learned how to code/ is still learning
what is a contraction
${this.client.user.username} it said that user TypeError: Cannot read property 'user' of undefined
Well, it's the shortening of a word, or a group of words by the omission of a sound or letter
π€ ;
oh
this probably doesn't have client prop
I mean... it depends on their code
there's no "use X or Y", it depends on their entire setup
show your code/command/event file where that error happens.
hmm well right
only client event handlers have this.client initially
of course if it defined by function keyword
he probably used a function and lost this context
Y'all really shouldn't help people on assumptions or guesses. It's usually not helpful, tbh.
Ask for precision, wait for answer, then give them more constructive responses, please ^_^
right... hhaa
sorry i am back
message.channel.send(embed)
^
ReferenceError: Cannot access 'embed' before initialization
show your code please
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "botinfo",
description: "info about the bot ",
async run (client, message, args) {
let embed = new MessageEmbed()
.setAuthor(
`Infomation about the bot ${client.user.username} bot`,
client.user.displayAvatarURL()
)
.addField(
{
name : 'bot tag',
value : client.user.tags
},
{
name: "server's command prefix",
value: message.guild.commandPrefix,
},
message.channel.send(embed)
)
}
}
you put the message.channel.send inside the addField function
put it outside of it
i am dumb
You're not. You're just inexperienced.
why keep [object Object]
[object Object]
the what now
it working but keep say [object Object]
[object Object]
wtf
Right, so, you have addField here but you're trying to add 2 fields?
you need to start reading docs, man.
Just use .addFields(

Show where you assign client.user.tags and message.guild.commandPrefix

const { MessageEmbed } = require('discord.js');
module.exports = {
name: "botinfo",
description: "info about the bot ",
async run (client, message, args) {
let embed = new MessageEmbed()
.setAuthor(
`Infomation about the bot ${client.user.username} bot`,
client.user.displayAvatarURL()
)
.addFields(
{
name : 'bot tag',
value : client.user.tags,
},
{
name: "server's command prefix",
value: message.guild.commandPrefix
},
)
message.channel.send(embed)
}
}
client.user.tag
U have tags
try that give the name of bot
No, show where your statements like client.user.tags = ... and message.guild.commandPrefix = ...
so my priefix is in config
addFields takes an array
you don' t have an array there
learnjs moment right there
where's your old message
@torpid otter at this point, please read this: #development message
Funny that official guide use his variant, arrays also can be used
https://discordjs.guide/popular-topics/embeds.html#using-the-richembedmessageembed-constructor
ik
@torpid otter define your config file at top of your file then use config.commandPrefix and client.user.tag
like const{config) = ('../config'
const config = require("../config")
i am sorry for be dumb
You're not. You're just inexperienced.
How to make currency system with json?
Show config.json and botinfo.js
const Discord = require('discord.js');
const { MessageEmbed } = require('discord.js');
const config = require("../config");
module.exports = {
name: "botinfo",
description: "info about the bot ",
async run (client, message,) {
let embed = new MessageEmbed()
.setAuthor(
Infomation about the bot ${client.user.username} bot,
client.user.displayAvatarURL()
)
.addFields(
{
name : 'bot tag',
value : client.user.tag,
},
{
name: "server's prefix",
value: config.prefix,
},
console.log(config)
)
message.channel.send(embed)
}
}
config.prefix π€¨
It was prefix right?
you did config.prefix as the key lol
yes
Make it prefix in config.json
{} <- this is an object
{"a":10} <- this is an object that contains they key "a" and the value 10
your config file is an object
config = require("./config.json") means your config variable is now an object
your object contains the key "config.prefix", not the key "prefix"
what should i change
so config (the object) .prefix does not exist
because your key is not named "prefix", you named it "config.prefix"
if you do config.prefix in your code, it will look for "prefix":"something" in your json file
not "config.prefix":"something"
i have change back to prefix
then it should work now
Guys
const { MessageEmbed } = require('discord.js');
const prefix = require("../config");
module.exports = {
name: "botinfo",
description: "info about the bot ",
async run (client, message,) {
let embed = new MessageEmbed()
.setAuthor(
`Infomation about the bot ${client.user.username} bot`,
client.user.displayAvatarURL()
)
.addFields(
{
name : 'bot tag',
value : client.user.tag,
},
{
name: "server's prefix",
value: prefix,
},```
no
i want to make an lock command ```js
message.guild.roles.cache.forEach(rooo => {
message.channel.updateOverwrite([
{
id: rooo.id,
deny: ['SEND_MESSAGES', 'ADD_REACTIONS'],
},
])
})```
you made the variable prefix be the full file now, not the prefix
why lol?
why json
i don't know what to put in the vlaue
i already explained
Then what is the best to make currency system?
use a database.
the problem is not what to put in the value, the problem is you not understanding what your code is doing
don't use json for currency systems.
Why?
explained here: #development message
lets try again:
when you do const something = require("../config") it means that the name something now represents the FULL config file, not any specific value inside it
so you need to use something.KEYHERE to get the specific value you want from your config file.
the KEYHERE part has to be exactly what you wrote INSIDE the config file
If you want to shoot yourself in the foot and make a noose for later, sure.
or mongo-db?
i fix it
Mongodb is fine
can you give me tutorial? I can't find it
good job! i hope you understood now how things work
yes thanks for the help
hmm
hmmm
then the prefix is not specific to guild
For a prefix to be per-guild, you need to have a settings system, thus you need a database.
https://enmap.evie.dev/complete-examples/per-server-settings is a great example of this
how do i move a html element to the right
while still like being affected by others
It wont be online,
I just restarted the bot and suddenly wont work
No errors in console
so like not pos: fixed
thankies
whats the structure like? whats the css for the container element?
display: flex;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 4.7rem;
align-items: center;
padding: 25px;
background-color: var(--bg-color);
border-bottom: 1px solid var(--border-color);
}``` this is the container
i want to make the dropdown
next to the name
while moving when name changes
so if name is longer
the dropdown moves more to the left
Name is arch or 0exe?
Add 0Exe container margin-left: auto
Or dropdown container margin-right: auto
what styles of navbar childs
wdym
process.env.TOKEN
Its a new repl.it feature
But it works for some reason now
and you added it?
how can i make the dropdown move depending on the name
i use fixed, right 0, translateX
so it is jut there
and doesnt move
First, if your .navbar fixed there is no reason to assign fixed or absolute for dropdown
Dont use translateX for such things to
its all fixed
Any of transform styles
no absolute
Keep fixed only what your need, in this case your name, dropdown and left name should be placed inside .navbar
they are
Then remove fixed from all .navbar childs
then how would i align them?
For left name flex: 1 1;, dropdown and name flex: 0 0;
Or for left name margin-right: auto
Your dropdown automatically sticks to right name
And try not to use width: 100%, left: 0; right: 0 do the same
like i literallt only wanna make it move next to the name on the right
ignore the left thing
Hello, I'd like to make a loading screen for my website, anyone know how I can cover the whole screen with an image for a set number of seconds, and make it fade away after those seconds have finished?
Remove margin-left for name or smth
Can you show your code?
both
html: ```html
<div class="navbar">
<h2>
Arch
</h2>
<div class="serverdrop" onclick="serverdrop()" id="drop">
<img src="https://cdn.discordapp.com/icons/744386877045604374/04341fc976fc11629eaac09f1b70d9a5.jpg" class="dropicon" id="drop2">
<span id="drop2">Arch Developers</span>
<ion-icon name="caret-down-outline" class="ddbtn" id="caret"></ion-icon>
</div>
<div class="displaydrop" id="displaydrop">
<div class="droplist" id="droplist">
<div class="serverdroplist">
<img src="https://cdn.discordapp.com/icons/744386877045604374/04341fc976fc11629eaac09f1b70d9a5.jpg" class="dropicon">
<div>Arch Developers</div>
</div>
<div class="serverdroplist">
<img src="https://cdn.discordapp.com/icons/744386877045604374/04341fc976fc11629eaac09f1b70d9a5.jpg" class="dropicon">
<div>Arch Developers</div>
</div>
<div class="serverdroplist">
<img src="https://cdn.discordapp.com/icons/744386877045604374/04341fc976fc11629eaac09f1b70d9a5.jpg" class="dropicon">
<div>Arch Developers</div>
</div>
</div>
</div>
<!--<div class="loginbutton user_login">
<div class="navbar_links">Login With Discord</div>
</div>-->
<div class="user_login">
<img class="avatar" src="IMAGE">
<div class="login_text">0Exe</div>
</div>
</div>```
css:
.user_login {
color: var(--sub-color);
margin-left: auto;
display: flex;
}
.login_text {
margin-left: 7px;
font-size: 1.1rem;
transform: translateY(10%);
}
.avatar {
border-radius: 50%;
height: 30px;
width: 30px;
}
.sidebar {
transform: translateY(2.7rem);
position: absolute;
left: 0;
}
.serverdrop {
border: 1px solid var(--dark);
background-color: var(--light-color);
padding: 10px;
color: var(--sub-color);
border-radius: 4px;
width: 16rem;
height: 3rem;
cursor: pointer;
display: flex;
margin-left: auto;
/*position: fixed;
right: 0;
transform: translateX(-13.5rem);*/
align-items: center;
color: var(--white-color);
}
.serverdroprad {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
}
.dropicon {
border-radius: 50%;
height: 25px;
margin-right: 0.6rem;
}
.displaydrop {
display: none;
}
.droplist {
display: flex;
position: fixed;
transform: translateX(-13.5rem) translateY(1.44rem);
width: 16rem;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top: none;
right: 0;
padding: 10px;
gap: 1.3rem;
flex-direction: column;
border: 1px solid var(--dark);
background-color: var(--bg-color);
color: var(--white-color);
}
.serverdroplist {
display: flex;
cursor: pointer;
}
.ddbtn {
margin-left: auto;
.navbar {
display: flex;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 4.7rem;
align-items: center;
padding: 25px;
background-color: var(--bg-color);
border-bottom: 1px solid var(--border-color);
}
}```
@still sky
.user_login {
color: var(--sub-color);
margin-left: auto; // remove
display: flex;
}
removed
ooh
pog
ty
and i have the actual dropdown
how can i align that?
its a div
and if the name length changes
how would i align it?
Remove fixed sltyles
remove transform
show how it looks right now and edit message with code
html didnt change
.droplist {
display: flex;
position: absolute;
transform: translateY(1.44rem); /* translateX(-13.5rem) */
width: 16rem;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-top: none;
margin-left: auto;
right: 0;
padding: 10px;
gap: 1.3rem;
flex-direction: column;
border: 1px solid var(--dark);
background-color: var(--bg-color);
color: var(--white-color);
}
.serverdrop {
border: 1px solid var(--dark);
background-color: var(--light-color);
padding: 10px;
color: var(--sub-color);
border-radius: 4px;
width: 16rem;
height: 3rem;
cursor: pointer;
display: flex;
margin-left: auto;
margin-right: 2rem;
position: relative;
/*position: fixed;
right: 0;
transform: translateX(-13.5rem);*/
align-items: center;
color: var(--white-color);
}
Add left: 0 for .droplist
It's wrong too π
lmao
add left: 0; right: 0 for .droplist
from serverdrop remove that properties
still nothing change
but alr
for the x axis
the thing is that the div
its not connected to anything
i positioned it
like it's its own thing
I didnt mention that
Place .displaydrop inside .serverdrop
html
@glacial trench taking a look at your website in #memes-and-media here, you should've asked here tbh but I can't write there since there's a cool down so I'll just use here.
First, your Navbar overlays the content of your document, a part of your image is under that.
Second, you have these 3 typer elements in a single parent element. So one affects all of them. You should either center the text or use separate elements for each.
Your "go top button" has issues in both dark and light mode.
There's a weird margin of that button and text gets invisible when you hover over it
You shouldn't use JS to redirect user here, use <a>, it'd be better.
Yeah, you have .serverdrop in navbar and in .droplist rename that
;-;
And please don't disable right click/F12, you can't really block it, there's always a way, you just make it more annoying for people.
wdym?
Wrong server man
lol
Other than that, it's good. You'd get better in time, so keep up.
You don't read any messages but that one?
#development message check this one
Ty
Iβm still kinda new to html and css
nevermind, place .displaydrop inside .serverdrop in html
Oh and just found this, your navbar's background isn't the same color as the bg of the content inside in dark mode
it doesnt help
ik
nobody knows that 20% is
what
like i can think ur 50% and joe thinks ur 20%
Well I know that
joe mama
That doesnβt happen for me ._.
I thought it's a mistake since it's all same in light mode.
scroll down
oh ill fox it
Fix
sure π¦
what do you guys think?
for π¦ sake autocorrect is being a clown rn
Ikr
lol
uhh so anyone know how to stop bot from getting added to random spam servers?
my bot servers are going up like crazy after getting verified on here
but not the commands usage
i think they're just spam servers
do a little eval and look for servers that have the same owner
hmm ok
not really sure if they'll have the same owner but ill give it a shot
if you stored a log of used commands, you could just count NΒΊ of commands per server
for better insight, group individual commands per server
hello
How can I delete topgg npm [dblapi.js] this
I have no token, I cannot start my bot before the error is gone
npm rm dblapi.js to remove the package but you should be removing the code that posts
the lib won't auto-start tho
just comment out the constructor
// comment that out
tΓΌrkmΓΌsΓΌn
why the hell do you create the class in a fucking command
it's not in a function at least
what are the odds that its a clone?
Good idea
Yup none have same owner
sad
does this happen to all bots added on top.gg
probably
Mine didn't
and I got the verification message after some advertising through auctions
I guess it depends
the spam servers I mean, not the verification lock
Ah
jesus christ debugging a befunge interpreter is a pain in the ass
I have a snippet of code which only sometimes works π
im new to this so what am i missing
error is coming from
<?php
try{
$database = new PDO("mysql:host=".DATABASE_HOSTNAME.";dbname=".DATABASE_NAME.";charset=utf8mb4", DATABASE_USERNAME, DATABASE_PASSWORD);
}catch(PDOException $e){
die("Error: ".$e->getMessage()."<br/>");
}
?>```
<?php
try{
$database = new PDO("mysql:host=".DATABASE_HOSTNAME.";dbname=".DATABASE_NAME.";charset=utf8mb4", DATABASE_USERNAME, DATABASE_PASSWORD);
}catch(PDOException $e){
die("Error: ".$e->getMessage()."<br/>");
}
?>
seems you dont have pdo(driver) installed.
I think its just apt-get. I dont really php, but if you google the error plenty of answers come up.
Try signing in as root or use sudo in front of apt-get
Hey i need help with mongo db
if i want to add a field
to an object
but i have already put it is the db
what should i do?
should i use mongo shell?
Hi, how much would a vps cost me, if I want to have just one bot to be on it? It doesn't need to be expensive configuration, just basic.
Fixed everything I found
how would i do that
5$/month
Great!
I'm on mobile and won't be home tonight, sorry, maybe I can check it later
I tried adding margin to the top but it didnβt work even with 900px
Alright
Would you recommand me any?
does anyone have experience with pug:jade
i am trying to use in an external script a variable
in the pug file
script()#[ var userid = #{userid}; ]
include script.js
how does something like this work?
Thank u, it means alot to me β€οΈ
hello?
i want here to give a variable with it that i can use in script.js
it is pug
2,5$ on 1gb and 15gb ssd
Digitalocean
Pinned messages has a bunch of good options, I'd recommend to just go through it and find the one you like most
https://i.callumdev.pw/z14q4.png
I could have this error ignored by adding as any, but I don't really want to do that, so what is causing this type error?
Typescript causes those types of errors.
Ayo.
I usually check my user if he has premium or not with this code.
if (timeout - (Date.now() - premium.premium) > 0) { /* If so, do something */ } else { /* If not */ };
Could I do it like this?
const premium = timeout - (Date.now() - premium.premium) > 0;
if (premium) {} else {};
yeah, absolutely
aight, thanks
i always use: var random_money = Math.floor(Math.random() * number here) +number here to get a random money, is there an easier way to do it, that i can just do 1000 < 10000, so like if will be between 1k to 10k
There's no easier way than math.random, no
Unless you use a lib you find on npm, in which case, your code will be smaller but you're also importing a lot of other code and running it.
Something weird occurred. React Native installed with errors and file save watcher start to detect file accessing or indexing, not sure
That when I ran ls -l -R at root
There is a method you can find online using a similar method to yours where you can return a random number between a range. Just look it up on google and stackoverflow will most likely be the first result
const findingPremium = await Premium.findOne({ userID: message.author.id });
const premium = findingPremium.premiumTime - (Date.now() - premium.premium) > 0;
if (findingPremium && premium) {
console.log("PREMIUM! :)")
} else {
console.log("NOOOOOO! :(")
};
premiumTime is the time the premium time was given.
doesn't work.
doesn't even log anything.
hey
how do i use split in send()
i srsly dont understand
can someone gimme an example
the premium variable won't work if there is no data saved in the Premium database
how can i fix that
how can i get an emoji's id with out nitro
You can just rightclick the emoji and "Copy ID"
bruh it was false lmao
but if no one sent it
hey
without anyone sending it, how do you know the emoji exists?
how do i use split in send()
i srsly dont understand
can someone gimme an example
stop spamming ffs
what abt u
Chill, chill.
i added it π
ill do it myself
look @umbral zealot
so it's a custom emoji on the guild? You can get it from guild.emojis , that's a collection
no like, not in a command
ty
π
Shouldn't you be able to send it if you're in the server though?
yeah
you don't need nitro to send an emoji in a guild where it's added
i think you can get it before sending
"local" emojis are useable by everyone
the fuck do you mean by "a moving emoji"
Is it in the guild or not
A gif?
bruh if i had nitro i would have shown you
yes
"Animated" is the word
sorry my bad...
anyways
how do i get its id
i cant send it because i dont have nitro
without a bot I don't think you can Β―_(γ)_/Β―
Open developer tools window (Control + Shift + I)
Open the emoji window, scroll emoji into view
Enter element selector mode (Control + Shift + Z, or through the box with cursor in the top left of the dev tools window)
Click on the emoji
The window on the left should highlight an element that starts <li role
This element should have a drop-down arrow to the left of it, so click on that to show the element's children
You should now see an <img... element. This should have a src="..." text. You can right click on the URL/link, and then "Copy link address"
The link should appear like
https://cdn.discordapp.com/emojis/681048970004267011.png?v=1
The number after
emojis/should be the ID
That's what I found
oop
bruh no
spaxter failed to escape the url
its not working
I failed
we'll get 'em next time
hey can someone else tell me
Lal
What, exactly, do you not understand in the use of split in send()?
it's a boolean toggle, there's not much to understand
you could just type in \ {emoji} (without the space) and then boom its there
yea i tried it
cant
unless you have nitro
yes you can
no you cant
i did {split :true}
no, because it's animated.
but idk im not getting it
you'd need to send the emote for that to work
The emoji won't show up unless you have nitro
not getting what ?
wait ill show ss
see
ive done it before hold on
oh yeah
that's not gonna work in an embed
without nitro, only with normal emotes
oh
You have to manually split it, when using embeds
ohk
nope animated aswell
then its fine
discord won't parse the emote into a mention if you cant send
it'll always be :name:
except you typed the whole thing
my point is now proven
fuck mobile
lol
Anyone know how to get rid of all this extra height? (It's a css grid)
who uses mobile
not without seeing the css
you could try using flex
Do you mean remove extra height and leave page background?
Yes, I'd like the height of that section to be till the content reaches, not the whole way down.
do you mean you want some of the content to appear underneath your ToC?
Remove bgColor from grid cell and wrap content to another div
so when you have lesS content, then
To that div you can assign bg, paddings whatever
to sum what he wants
I'd like the height to just be the height of the content.
the height is currently the height of the content
So we have a miscommunication
@cosmic forum can you rephrase what you want
because it looks a lot like what you're asking is what you have right now
Yes, something like that
So you meant the height of the table of contents
btw, you don't need to use <div> for that ToC list, html has <ul>
yeah this is probably due to the use of grid
main {
display: grid;
grid-template-columns: 1fr 3fr;
grid-gap: 10px;
margin: 10px 0;
}
does anyone know how to make a bot in python to send a message in a channel name for example Logs
My bot just got approved!
Congrats 
ty
Is it possible to search through my entire github repo code for a specific word?
It's done using CSS primarily and an iframe it appears for the website part below
i already did for my website
Then idk what you're asking 
but can you show me how to do for the background please
body
{
background-image: url(the url);
background-repeat: no-repeat;
}
"body" is not the ID of the bg
i don't know were to put that
ohhh ok
ohhhhhh now i get it
thx a lot
Hold on I'll link you something to help you out for the future.
oh thx
thx
So you don't have to press "preview" a million times.
and it can find classes / ids of top.gg
thx
i'm realy a noob can you help
well i hope you're putting css in
<style>
</style>
in the long description
kk
ok
hi
const source = [1,2,3,4,5,6,7,8,9,10];
function removeFirstTwo(list) {
// Only change code below this line
const [a, b, ...arr] = list; // Change this line
// Only change code above this line
return arr;
}
... while learning, is this the rest or spread operator?
That is the rest operator, because it gets the rest of the array elements
sadly, no
But doesn't spread take multiple parameters and spread them?
but you can clone the repo and use find in files
If you were to do const arr2 = [a, b, ...arr]; then that would actually be the spread operator
spread expands something, rest contracts something
in the above case, its contracting the items into a single variable
The ... is originally called the spread operator, in cases of applying rest parameters which means as many parameters as you'd like and also when deconstructing from arrays, it is called the rest operator
if you did ...source then it would expand the variable into a new array
hmm thx but idk why it doesn't work for me ;-;-
is that a thing? damn that's kinda useful ngl
ye
can someone help me
I mean, I knew about spread
im gonna post some images here
DM me your bot page, and what bg you're trying to use (image URL)
thanks π
so sorry for flood
https://cdn.discordapp.com/attachments/829417560038440982/834128377261719562/Captura_de_Tela_2021-04-20_as_15.06.15.png
https://cdn.discordapp.com/attachments/829417560038440982/834128375030611998/Captura_de_Tela_2021-04-20_as_15.06.17.png
https://cdn.discordapp.com/attachments/829417560038440982/834128372875132988/Captura_de_Tela_2021-04-20_as_15.06.43.png
https://miobot.weebly.com/
how do i fix this
bruh
but contracting arrays/objects into a single variable is useful af
fix what?
original language japa but idk how to fix
look at images
the other languages the font goes inside the background
so u cant read well
set div width maybe?
who owns that site?
weebly


