#development
1 messages · Page 1063 of 1
@rare horizon what help do you need?
How do I get help doing a bot?
@rare horizon First you need to go to https://discord.com/developers/applications to make a bot.
Integrate your service with Discord — whether it's a bot or a game or whatever your wildest imagination can come up with.
Then name your bot.
You can start an application clicking "New Application" In the top right of your screen.
I think he knows how to make the application lol
Actually I'm suposed to be helping another guy with his bot... but I never tried to create a bot here... so... I'm pretty confuse
Oh
No... I don't know.. not here...
hahaha
I will post the script here... if someone find see something wrong
I'd go with youtube tutorials my guy
Indeed
Right now I'm just watching how to code a bot properly
{
"name": "rephael",
"version": "0.0.1",
"description": "Um bot mal... brincadeirinha hehe",
"main": "rephael.js",
"scripts": {
"start": "node rephael.js"
},
"dependencies": {
"discord.js": "12.2.0"
},
"engines": {
"node": "12.x"
},
"license": "MTI",
"keywords": [
"node"
]
}
But instead it showed this problem
You don't do anything their @rare horizon
Leave that alone
Make a new file called "rephael.js"
Code in that file
Afk I'm gonna play a while
Since VS Code is broken.
Imma assume windows 7 can't process it that's all
Oh
{
"name": "discordbot",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "Melou",
"license": "ISC"
}
it closed my discord
'_'
'_'
discord bot is on how many servers?
using discord.py
how do i see this?
400 Bad Request (error code: 50035): Invalid Form Body
In embed.image.url: Not a well formed URL
can anyone tell me why this error occured while trying to set embed.set_image to a gifs url , it's only happing for some gifs
.,.
The error is kind of self-explanatory. Can you show us the gif you're trying to use in the embed.
Also are you using a library (and if so, which one)
The error is kind of self-explanatory. Can you show us the gif you're trying to use in the embed.
@sudden geyser https://media.giphy.com/media/l44QvKoQuUD3xPZKg/giphy.gif
Can you show us some of your code where you were making the embed.
just a moment please
@earnest phoenix client.guilds is a list of guilds the bot is in
not using ext
this is the main file
const Discord = require("discord.js");
const client = new Discord.Client();
const config = require("./config.json")
client.on("ready",()=>{
console.log(O bot foi iniciado, com ${client.users.cache.size} usuários e em ${client.guilds.cache.size} servidores.);
client.user.setActivity('(Lendo conversas...)',{type:'PLAYING'});
(Eu estou em ${client.guilds.cache.size} servidores);
});
clent.on("guildCreate",guild=>{
console.log(O bot entrou no servidor: ${guild.name} (ID do servidor: ${guild.id}). Membros: ${guild.memberCount} membros! );
client.user.setActivity(Estou em ${client.guilds.cache.size} servidored.);
});
client.on("guildDelete",guild=>{
console.log(O bot foi removido do servidor: ${guild.name} (ID do servidor: ${guild.id}));
client.uset.setActivity(Serving ${client.guilds.cache.size} servers);
});
client.on("message", async message => {
});
client.login(config.token)
if(comando === "ping") {
const m = await message.channel.send("sx!ping");
m.edit(.ping-pong:Pong!\nA latência é ${m.createdTimestamp - message.cratedTimestamp}ms. \nA latência da API é: ${Math.round(client.ws.ping)}ms);
}
Can you show us some of your code where you were making the embed.
@sudden geyser ` embed = (Embed(title='🎵 Now playing :', description=f"{info['title']}", color=0x9240FF)
.add_field(name='Duration', value=Music.parse_duration(info['duration']))
.add_field(name='Requested by', value=author)
.add_field(name='Uploader', value=f"{info['uploader']}")
.add_field(name="Queue", value=f"No song queued")
.set_image(url=f'{x}')
.set_thumbnail(url=info['thumbnail'])
return {'embed': embed, 'source': info['formats'][0]['url'], 'title': info['title']}`
Try logging x
are you doing print(client.guilds)?
Sall
how to get verification on my bot please ?
Romania
-verifybot @earnest phoenix
@earnest phoenix
Hi! It seems like you are looking for information on how to get your bot verified.
Once your bot reaches 75 servers or more, you are eligible for bot verification. On October 7, 2020, bots with 100 servers or more that are not verified will not be able to be invited to any more servers. You verify your bot on your bot's application page, under the "Bot" section in the sidebar.
If you need more information, check out this article written by Discord about The Future of Bots on Discord and you can ask questions in the Discord Developer Server.
We cannot provide support on how to get your bot verified.
Ok... now I lose who was helping me... lol
a built-in function len on the list
yup
I'm not attempting to do this at the time, but has anyone attempted to write a GUI in Python, and what was it like?

I've seen plenty of programs written in PyQt5
There's a 15-minute-apps that utilizes it iirc
i was trying to do the .setThumbnail and when i try it it's not working is this correct?
.setThumbnail(message.guild.iconURL)
What version of Discord.js are you using.
I can't get the verification for my robot while I have 75 servers help me
v12
iconURL is a method.
oh ok!!
I can't get the verification for my robot while I have 75 servers help me
@earnest phoenix discord.gg/discord-developers will help you ( btw u need 76+)
wdym 76
The system message from Discord coming when the bot reach 76 Servers, not on 75
iconURLis a method.
@sudden geyser shall i do.setThumbnail(iconURL)?
You should keep the message.guild part, except call .iconURL as a method (.iconURL())
It also takes some options you could use: https://discord.js.org/#/docs/main/stable/typedef/ImageURLOptions
if (command === "slowmode") {
if (!msg.member.hasPermission("MANAGE_CHANNELS"))
return msg.reply("You don't have `Manage Channels` Permissions");
{
var time = msg.content
.split(" ")
.slice(1)
.join(" ");
if(!args[1])
return msg.reply(`Slow mode is enabled with a cooldown of ${msg.channel.RateLimitPerUser} seconds `)
// if (!time) return msg.reply("Please enter a time in seconds!");
if(time === "off"){
msg.channel.setRateLimitPerUser(0);
return msg.reply("Slowmode Turned off!")
}else{
msg.channel.setRateLimitPerUser(time);
msg.channel.send(`Slow mode now enabled with a cooldown of ${time} seconds`);
}}
}
this is what my bot says
If (!args[1])
Will only run if args[1] is undefined
ik i checked on discord.js but i am still confused. how to put the user's name and the user's avatar on .setAuthor sorry :<
The first argument is the text that will appear on the author field. If you have the message that was sent, you can use message.author to get the author of that message (then .username if you want their username).
if(args[0]){
args.toLowerCase()
return await CheckHasCommand.Check(message, bot, args)
}```
UnhandledPromiseRejectionWarning: TypeError: args.toLowerCase is not a function 
args sends a string?, toLowerCase acts on the strings right?
Yea
If you want to toLowerCase() the whole args
Join them first
args.join(" ").toLowerCase()
The first argument is the text that will appear on the author field. If you have the message that was sent, you can use
message.authorto get the author of that message (then.usernameif you want their username).
@sudden geyser
is this the right command?
.setAuthor(message.author.name)
User doesn't have a name property
^ It has the username property though.
so it's
.setAuthor(message.author.username)
?
Yeà
Try it out.
okii
Can you guys tell the main use of the global function void?
It just evaluates the gives expression and returns undefined...
Does this function even has a big use 
IT WORKS! but it only has the name how to put there tag?
just message.author.tag and remove message.author.username
ohh kk how to put there avatar too? (im sorry if i ask so many questions)
author
Can you guys tell the main use of the global function
void?
It just evaluates the gives expression and returns undefined...
Does this function even has a big use
@earnest phoenix there's no real use for it from what I've seen other than if you want a short statement to end withundefined.
I'd just avoid it when I can.
dynamic: true,
size: 1024,
format: 'png'
}))``` @fierce wolf
@sudden geyser well it's useless

99% of the time, unless you want to keep a statement short. For example: ```js
let fn = (...args) => Promise.resolve(args);
Promise.resolve(5).then(() => void fn([1, 2, 3, 4, 5])); // Returns undefined instead of a promise holding ann array of numbers.```
The alternative is to simply not short return (or use return) and add braces.
I mean there's literally no benefit or difference however, idk what JavaScript devs was smoking when they added this

Anyone familiar with nuxtjs discord oauth flow
dynamic: true,
size: 1024,
format: 'png'
}))``` @fierce wolf
ty!
I mean there's literally no benefit or difference however, idk what JavaScript devs was smoking when they added this
@earnest phoenix I think it's just a convenience keyword, but yes it serves very little purpose.
Little purpose as 0.000000000001%
For example, I think it's used with JavaScript:void(0) on the web
guys are there any good opensource music bots that actually work and have no issuess? (djs)
No, all are outdated
But you can just look at how they were made and make an updated version
I have a bot that is waiting for review but I have two functions that might get it declined.
Is it allowed:
- To have a
!profile @usernamethat retrieves a profile even though that profile has been made on another server? All you can see is profile pic, name and in-game statistics - To have a
!rankthat gives you the global top 5 players? The database doesn't care what server you're on.
Thanks if anyone has any insight on this.
First might be ok but you gotta ask that to a mod to make sure, but second is not
ok , thank you
auth: {
redirect: {
callback: '/callback',
},
strategies: {
discord: {
_scheme: 'oauth2',
authorization_endpoint: 'https://discord.com/api/oauth2/authorize',
userinfo_endpoint: 'https://discord.com/api/users/@me',
scope: ['identify', 'guilds'],
response_type: 'token',
token_type: 'Bearer',
client_id: '525810495786057758',
cleint_secret: 'CLIENT_SECRET',
token_key: 'access_token',
},
},
},
This returns a user object as expected but I also want to be able to fetch the user guilds and such as well
music bots are easy tbh
lies

join vc, play opus stream
very ez
I mean it's easy if you're a proficient, i made mine in 7 hours
I mean with all the commands
Easy for a small scale bot but if you want to make it large scale then it's not that easy
ok then make me a music bot 
Only thing it needs is just clusters and shards
Done
Don't see the hype around music bots anyway
they're just a pain
Wot
expensive to run and no better than the next
@earnest phoenix make that 21 ;P
i use YouTube for music
Same
it's not glitchy
(Main hype is music, after i added music to my bot it grew a little more than it did before) @strange trout
my bot is nearly half way to a big milestone
Mine is in 500 servers lol
(Maybe) @earnest phoenix
mines in 45,000
nearly halfway to 100k 😎
when you make better commands than almost any bot does but nowhere near their guild count
Tonybo do you use nuxt
yes, why
I need help with discord auth
what lib
discord.js
discord.js doesn't have oauth functions built in and isn't related to nuxt or web development whatsoever
i'm not entirely interested in helping while i'm in bed though
good job?
I know lol. Using nuxtjs with nuxtjs-auth
belongs in #general @hexed rover
i don't know nuxt auth sorry
made my own implementation
I have this issue: TypeError: Cannot read property 'get' of undefined
let serv = req.client.guilds.get(req.params.guildID);```
ah okay
Don't see the hype around music bots anyway
big agree. it isn't going to sound good anyway due to discord
@limber swan client doesn't have guilds property
To what I change it
I should probably just make my own implantation as well. I'm pretty sure nuxt auth allows you to make your own schemes though
@limber swan what's req.client ?
Your bot?
its exress, dasboard
Oh then it doesn't have a guilds property, you get guilds from the bot not express
nice job
dynamic: true, size: 1024, format: 'png' }))```
@earnest phoenix
i know i'm late but it's not working..
dynamic: true,
size: 1024,
format: 'png'
}))```
can someone send a complete programering
@fierce wolf <client> is your bot whether you defined it as client or bot and IDs are strings not numbers
- ID
+ "ID"```
wait i am confused 0-0 can u try to edit my code?
dynamic: true,
size: 1024,
format: 'png'
}))```
sorry :< @earnest phoenix
iam trying to create a music bot and i need help with the commands
@raven crystal learn a language and then do the funny coding thing
can you help me start or how do i learn it?
gong <Something> is an example to represent an instance of Something
Also .get() takes a string, not a number due to the number being too large to represent in JavaScript correctly.
okey i dont understand. thanks anyways
Is there a way to manually restart a specific shard in Discordjs?
there has to be somehow but i dont know shit about discord.js sharding so i dont know how to
I know there was triggerReady() in v11 but couldn't find anything for v12
Hello Guys.
how can i make a script execute once every month, even if the bot restarts?
I have a question.. I want to make it that when someone uses my main command, a!help, it will fs.writefile to a json file with his name, and his id.
how can i make a script execute once every month, even if the bot restarts?
@tight plinth Date.now().getDate()
I have a question.. I want to make it that when someone uses my main command, a!help, it will
fs.writefileto a json file with his name, and his id.
@feral aspen that is stupid in 2 ways
- You are not allowed to log a persons information w/o their knowledge
- Dont use a json db
hmmm
That falls under user consent so they are allowed to store the user name and ID
That falls under user consent so they are allowed to store the user name and ID
@slender thistle Am i allowed to store people username and ID?
That is allowed right? Cause I have seen some developers do that too
Only if the user executes a command and that you are transparent about it
Yes..
I don't see why you need to store that though
Like money systems.
so basically tell them that their info such as username might get logged to assure safety
then they are informed and it SHOULD be fine
// To write the file:
const fs = require("fs");
fs.appendFileSync("./logfile.txt",`NAME: ${message.author.tag}; ID: ${message.author.id}\n`)
on txt?
thats js code you can use to write the file
put that in your command handler for the command help
I will be trying.
One sec.
By the way
Which is more safer to store in
Json files or txt?
Question.. I did the same thing with a json file
but instead of giving me like this..
{
Name:
Name:
Name:
}
It gives me like this
{ Name, Name, Name, }
Can anyone help me with html/css
how can I fix that?
@feral aspen use \n
How do I center the DOCS button
the what
oh
it's not center
I think you might like transform:translate(0,-50%);, position:absolute; and left:2%;top:50%;
@earnest phoenix
here is the site
maybe it's easier if u try
so when i close my VS Code my bot turns out offline how to fix it?
you dont run your bot on vs code
get a host
get a vps, transfer the code to there and run it on there
how?
Hey
For your login form, transform: translate(0,-25%); seems to work fine @earnest phoenix
fs.appendFileSync("./logfile.txt",`Username: ${message.author.tag}; ID: ${message.author.id};\n`) works but if someone does it twice, it logs twice...! 😦
thats called logic
how can I make it that if someone isnt logged there, then new log.
and if logged, then DONT log
you check if the file contains the text that you wanna log
after when im on the site what's next?
just replace the current code to log the author with ```js
const fs = require("fs")
let text = Username: ${message.author.tag}; ID: ${message.author.id};\n
if (fs.readFileSync("./logfile.txt","utf8").includes(text)) return;
fs.appendFileSync("./logfile.txt",text);
@fierce wolf you add the css property i just sent to the button on the top left (wrong ping, sorry)
@earnest phoenix
transform: translate(0,-25%);
where does this code go
Thanks @earnest phoenix 🙂
onto the style of the button you want to change @earnest phoenix
wait is vps free?
i used google.
to get a free hosting service, I'd recommend heroku, combined with uptimerobot to keep it alive
I recommend Digital Ocean.
No do not use heroku
Free amazon aws hosting
Or repl 24/7 - better than heroku because it can do json and write files etc
Or you can always not be poor/cheap, go get a job and buy a good old $3 vps :0
Heroku is just disappointing though
need help
Amazon Aws better
i forgot something
how do i make the arg that if i say like: ron turn (then what i sayed)
to: ok here you go (what i sayed)
?
but digital is good
🙂
i forgot something
how do i make the arg that if i say like: ron turn (then what i sayed)to: ok here you go (what i sayed)
?
@stiff stream What?
microsoft azure ftw
damn, all this websites has prices but it's usd it's not my money 0-0
like if i type my command and like: prefix command (hey hey)
it will send it like this:('hey' 'hey')
Make it 'hey' + 'hey'
who pinged me?
digital is fine. pretty stable and ok pricing. (also got my DB cluster running there and moving it is annoying)
Make it 'hey' + 'hey'
@feral aspen yeah but i forgot how to make the arg... can someone make and send me the command
like if i type my command and like: prefix command (hey hey)
it will send it like this:('hey' 'hey')
@stiff stream One sec
Ill send you the command
ty
@vague kite you need to send it across the shards with brodcast eval
if(args[0] === 'hey') return;```
Can someone help me m getting error on heroku
what error
wait how do you make say command?
EXAMPLE:
{prefix}say hi i'm cute uwu
ty
np
@fierce wolf you get the args, you join them and reply with that string
ImportError: cannot import name 'default' @earnest phoenix
@fierce wolf you get the args, you join them and reply with that string
@earnest phoenix what is the code?
aka ```js
let text = args.join(" ");
if (!text) return message.channel.send("You have to give me a text to say you doofus ;)");
message.channel.send(text);
ImportError: cannot import name 'default'@earnest phoenix
@plain acorn idk about that error ngl
@feral aspen but what i put in the 'hey'.. i meant that no matter what i type it will say it in 'this'
are there other free hosting available ? other than heroku?
are there other free hosting available ? other than heroku?
@plain acorn nope
@feral aspen but what i put in the 'hey'.. i meant that no matter what i type it will say it in 'this'
@stiff stream ?
@stiff stream ?
@stiff stream I didn't understand, sorry!
wow 
if i type something no matter what, the bot will send it with " " in the sides
@feral aspen
ok @earnest phoenix so i have the table in my bot, and the bot has to update it on a timer, then this php script is in the cron ...you can use any language you like really
if i type something no matter what, the bot will send it with " " in the sides
@feral aspen
@stiff stream ?
guild_permissions
<?php
$settings = json_decode(file_get_contents("config.json"));
$conn = mysqli_connect($settings->dbhost, $settings->dbuser, $settings->dbpass);
if (!$conn) {
die("Can't connect to database, check config.json\n");
}
mysqli_select_db($conn, $settings->dbname);
mysqli_query($conn, "DELETE FROM infobot_cpu_graph WHERE logdate < now() - INTERVAL 1 DAY");
$cpu_percent = trim(`ps aux | grep "./bot " | grep -v grep | awk -F ' ' '{ print $3 }'`);
$current = mysqli_fetch_object(mysqli_query($conn, "SELECT * FROM infobot_discord_counts WHERE dev = 0"));
mysqli_query($conn, "INSERT INTO trivia_graphs (entry_date, cpu, user_count, server_count, channel_count, memory_usage, games) VALUES(now(), $cpu_percent, $current->user_count, $current->server_count, $current->channel_count, $current->memory_usage, $current->games)");```
hm
the cpu_percent bit is just a way i have to measure the total cpu of the bot as seen by the OS, because its a pain in the ass to do the maths against the values from /proc
some one know how to make a command that
if i type something no matter what, the bot will send it with " " in the sides
and then that builds a table that i then output with this:
https://triviabot.co.uk/botstats/ <-- feel free to snaffle source
some one know how to make a command that
if i type something no matter what, the bot will send it with " " in the sides
ban_members?
and you can create arguments simply
N3RD, what are your questions exactly?
Could you please start being more specific about what is erroring out?
arguments = msg.toString().split(" ")
N3RD, what are your questions exactly?
@slender thistle He is willing to get the code for the ban members.
please someone that know how to make commands good say 1
arguments.shift() //this will remove the comand and prefix of message
i got a question
I want to put permission on the ban only for adm.
please
He answered your question
where?
I want to put permission on the ban only for adm.
@earnest phoenix Ok wait
where?
@stiff stream ?
not using ext
I want to put permission on the ban only for adm.
@earnest phoenix https://discordapp.com/channels/264445053596991498/272764566411149314/733341475747659827
@feral aspen where?
Starting from discord.py versions 1.0.0 and further, anything server is guild
ok
so you code can be like
let arguments = msg.toString().split(" ")
arguments.shift()
msg.channel.send('"'+arguments.join(" ")+'"')
?
What?
discord.Guild.ban IS WRONG
such chaos in here
@feral aspen please answer. where he answered ?
You are supposed to access an instance of a Guild, not the class itself
@stiff stream all of space_interprise's messages were for you
i think is offencise that last message of your code @earnest phoenix
read them all
@feral aspen please answer. where he answered ?
@stiff stream Hey.. I dont have a correct answer.. sorry! You could ask others.
message.guild.member(banMember).ban({ days: 1, reason: reason}).catch(err => console.log(err))
banMember is the let statement
beware.
like who ever you made it the args[0]
ok i read them but i dont know how. can someone please make the command and send it to me?
@feral aspen are you giving javascript code to someone using python?
You have a "variable" message, an instance of class discord.Message
a message is bound to a channel, which is attached to a GUILD, and discord.py allows you to use shortcuts, so you can use message.guild to get the guild where the message was sent from @earnest phoenix
@stiff stream its hard do that because we dont know how you bot work
^ also spoon feeding
@feral aspen are you giving javascript code to someone using python?
@quartz kindle ohh.. oh god. woops
Oh, and... guild.ban only accepts a User or a Member
need help
mais um br kkkk lul
Hi everyone, does anyone know how I do a setprefix command? to change the bot prefix from discord with a command
You don't need to re-send the question not even a minute after you sent it the first time
hello,
How do you get the variable for user badges?
sorry
global prefix or per guild prefix?
global
@fading sigil What library?
make a command that changes your prefix variable, then update your config.json if you have one
where is your prefix stored?
then my message above is the answer
thanks @quartz kindle
thanks
hey guys quick question
i recently got sublime text3 and im wondering how i can put an image in a .png image, any ideas?
this is what it looks like as soon as i create the png file
maybe here isnt the correct place, sorry if dont, but i need some command ideas, i think my bot have a small comand list for a bot.
imo doesn't really depend on the commands, depends on the functionality and flexibility
what do you mean? (sorry for the english, im 🇧🇷 )
pse
just like make it good and with no bugs or something lol
can you please say what command and what is going wrong?
what do u need?
can i send it in DMs?
why dont you send it here?
you have no permission?
yeah?
is this python?
JS
There's no switch statements in Python and you can't declare variables like let X
whats wrong with it?
@stiff stream Do you want to remove the " "?
where?
now it should work?
nice
?
this is how to command works
but
i want it to do that if i type gen turn aaaaaaaaaaaaaaa
aaaaaaaaaaaaaaa
aaaaaaaaaaaaaaa
it will send it like that: "aaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaa",
"aaaaaaaaaaaaaaa",
is it possible
?
sho you want to it reply the line breaks too
send it on a new line?
?
u can args.slice(1).split(',').join('\n') ?
what
u can
args.slice(1).split(',').join('\n')?
@digital ibex
do you even know what that does?
nope
uh
im new to codes
wait
what happened to fs?
nothing
split does only work on string?
oh lmao
wdym space interprise?
yeah?
i want it to send each one of them in " ",
args.slice(1).split(',').join
array^ ^string ?
join("\n")
functions need to have a () to be called
and insed the () you can put arguments
if the function need arguments you have to put they inside the ()
(argument)
ok let me do that
k
Anyone can help me? Ejs?
Does anyone here use Vultr? I run a fairly large PlayStation API and Sony's DDoS protection falsely flagged each of my VPS, blovking their IPs... I need to verify if they've blocked all of Vultr's address space. I just need someone with Vultr to curl https://account.sonyentertainmentnetwork.com/ and tell me if it responds with a 402 - Access Denied.
//msg is your message element, the element discord send to you with the message
args = msg.toString().split(" ") //split the message by spaces
args.shift() //remove the first element, because it will aways be the name of the comand in your case turn
args.forEach((element,index) => {
args[index] = '"'+element+'"';
}) // this will put the "" on all elements of array
args.join("\n") //transform the list into a string again but this time the string have no more the turn command
msg.channel.send(args) //send the message
i think this should work
me?
@sand ginkgo
yes
ty
enconded
I've got a wee odd problem
oh and i got a problem that no one here know how to fix
Is writing url Must be deleted? @quartz kindle
nvm
what problem?
oh and i got a problem that no one here know how to fix
what problem? @stiff stream
i got a giveaway command
and its use JSON
and because heroku have a problem with JSON
Where to put it? @quartz kindle
the giveaway timer if its more then 1 day its stopping it in the middle or something
@sand ginkgo you misspelled it
Bruhhh
i think the heroku is restarting you bot or stopping the time because it is soo long
Where i put enconded? @quartz kindle
dude....
i think the heroku is restarting you bot or stopping the time because it is soo long
@quaint hornet so what i need to do
i dont know, i never use heroku before
its not enconded
its encoded
from "code", "to encode", not "conde", not "to enconde", that doesnt exist
Can I get feedback on http://alebot.epizy.com/
Okay @quartz kindle
he is telling you to use some database service like mongo db
ty
he is telling you to use some database service like mongo db
@quaint hornet how?
i think
@stiff stream with mongoose, you can just link back and front to the same db
mongo db have a tutorial for that i think
I think
Me when the k:

does anyone know how I can move the button down?
i tried margin-top: 10px; but it doesn't change
how is your css?
i need some help
getting this error
Error: ENOENT, No such file or directory './menhera.jpg'
for this line
const background = await Canvas.loadImage('./menhera.jpg');
my test.js file and image is in same directory
all it is is just
display: inline-block;
padding: 15px;
border-radius: 15px;
outline: none;
border: none;
background-color: rgb(119, 117, 117);
background-size: 200%;
font-size: 1.2rem;
font-family: 'Poppins', sans-serif;
margin: 8px;
transition: 0.7s;
ImportError: cannot import name 'default'
This error is showing on heroku terminal need help
i have a bot that i want to get verified, can someone add him to his server? i will give you a link that he will have no permissions, just mute him, please? if its ok DM me
?
if (message.content.toLowerCase() === "un") {
console.log("rr")
client.commands.get('rr').execute(message, args)
}
for some reason this if statement just isn't running but other if statements inside of the client.on section run?
anyone know why?
discord.js btw
whats above it?
r u just sending un ?
lol skid
@stiff stream you add your bot through the website top.gg, then you wait 2-3 weeks until the mods test it, then if it gets approved, they will add it to this server
add an else statement and in that statement log message.content
ight
put that above the if(message.content.startwith(prefix) @solar pivot
oh im dumb 🤦♂️
oh lol
thats not related to development btw, but u can see https://discord.com/partners
announcement channels are part of the developer license afaik
Does anyone know what line 3 is called?
The announcement
announcement channels are part of the developer license afaik
@quartz kindle
Really
its called a hamburger menu/button
oh yeah
good luck pcgamer
:^)
tim, any ideas how i can move a button with css?
move it towards the bottom
o ok
1 sec
that puts the button
the arrow is where im trying to put it btw
gl with that 
How do you move a word to the middle from the bottom of the picture?
<center> html tag or text-align:center on the parent object
Hmm
@sand ginkgo it's called hamburger menu
thanks lol
Bruhh @fast yacht
constantin, i was trying to do the same thing too, any ideas how i can move it down?
<center> html tag or
text-align:centeron the parent object
@earnest phoenix Can be demonstrated as what. I just understood about the website :/
margin-top: for not good or position:absolute;top:<something> for good @digital ibex
kk thanks
Hmm
wdym by "good" ?
the first one is more ugly
Okay maybe you should use margin-top in that case
margin-top doesn't move it
set it to like 50px to see the effect
http://alebot.epizy.com/
I want to move the text at the bottom upwards but it's not working (will send css in a sec)
the fuckeroo
Fuckadoodledo
then there is one more thing that you could try
oh
ill tell you its a pain to reposition but
i done css positon: relative; margin-top: 50px;
it works out somehow
k I've never been so confused in my life. Basically my script editor shows me that my script looks like this.
and it worked
oh ok
when in reality it looks like this, and it's causing taberrors
oh jesus graphics card
Aaaaa
anyway I don't understand why my script editor isn't showing me what my script actually is
and because of that I can't fix the tabs
Use a different bin
y
here, did it in pastebin too
same problem
it shows what my code actually looks like
But when I go in a script editor like VSC
and even Notepad++
the tabs are wrong, and I can't run my code cuz of TabErrors
isnt that the exact same or am i missing somethin here
well for one, in my script editor it's 2-space tabbed
and for 2
Look how far "Stuff for moderating" is tabbed in compared to the first "def __init__"
between the two
on my script editor, they're tabbed in the same space
but when tossed in a bin, their tabs are completely different
the Stuff for moderating has the 2-space tab like it should, but the def has like an 8-space tab
and that's causing my TabError
quick question... i think
how can i move the button with a bit of css to be next to the css button?
they're both in the center tag, which is why they're like that
Welp I tried restarting my PC and even that didn't help
Quick question.
Everytime I type Code . in command prompt it shows this
It shows a black screen on VS Code.
someone know how can i make my bot resolve math expressions like x²+10x+25
What even is Code . @earnest phoenix
it opens the current folder on visual studio code
What even is Code . @earnest phoenix
@still merlin I typed code .
node .
Not code .

:/
code . its the command to open the current terminal folder on visual studio code
It is.
any ideas, anyone?
the problem isnt the comand code .
its your visual studio code
some bug is making he dont render the ui
causing the black screen
So I figured out something with my problem but I don't know why it's happening
For whatever reason, whenever I hit tab in my script editor, it does a 2-space tab like it's suppose to
causing the black screen
@quaint hornet How do I fix it?
But in the actual file
It does an 8-space tab
your visual studio code has the extension for your language
he adjusts the tab spaces amount
oh-
depending of the extension
take for example this. This is what it looks like in VSC
but this is what it looks like in the script
{
"name": "discordbot",
"version": "1.0.0",
"description":
"main": "main.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "Melou",
"license": "ISC"
}
@earnest phoenix i think you are looking for this
Actually I already have that installed
Is there something I forgot to enable for it to work?
Please help me how i can make a emoji collector and when ppl react to a emoji it give that user role
Depends what you're coding in Nguyen
so the bot send a message and react the message with emojis
and when you click on the reaction it do something?
i just want to know how i can get Emoji id
oh
@quaint hornet i will do it with my self
just type the emoji with a \ in front of it
😄
that is emoji name
\😄
i mean id
I know you mean ID
id?
If you want ID, do it with a custom emote
yes
👍
just do \:emote_here:
i want to get Thumb up id
\👍
IDs don't exist for default emotes afaik
also Space with that screenshot you sent earlier it didn't really help
I'm not sure what to do still
msg.channel.send("👍 look a hand!")
ok
cuz I don't do \t to do tabs
thx
yep that'll work
so i can get it only with emoji.name
smh
Space when u sent this https://cdn.discordapp.com/attachments/272764566411149314/733371138859597985/unknown.png what exactly did you suspect my problem to be
that I was using "\t"?
sorry _L i dont program python so i send this part who says some of problems
ir python ??
ur
yea I'm coding this in Python
And it's been driving me nuts
because I have absolutely no clue what's wrong with VSC
When I get a website template from online am I allowed to tamper with the code and change up some stuff and add stuff?
you have to read their license
ImportError: cannot import name 'default'
This error is showing on heroku terminal need help @pure sun
@plain acorn default is a reserved name in js
Alright
@plain acorn default is a reserved name in js
@tight plinth my code is in python
ImportError: cannot import name 'default'This error is showing on heroku terminal need help @pure sun
@plain acorn send me your source code
oh wait
on heroku
lol
maybe you messed up in Procfile
@plain acorn in almost every programming language default is a reserved name
or you didnt added anything in requirements.txt
It means that you can't create a variable with the name "default"
maybe you messed up in Procfile
@pure sun how so
or you didnt added anything in requirements.txt
@pure sun i did
O
@plain acorn in almost every programming language default is a reserved name
@tight plinth the code works on my system but is not working on any online hosting platforms
i tried running it on vm machine from google cloud and it throws the same error
hey someone who undestand of get html using node js can help me
i want to do a command who will return the lyric of a music
and i want to use a site who return the oriignal liryc and the translated version
this is the site
looking for their html i see they have a main div
lyricContent
and inside this div have another div
inside this div have a lot of divs
inside this divs have a p element with the text of every line
how can i get te text of all p inside this divs
anyone here got a explanation about how to write regex strings? want to replace <> for disabeling the ability to ping roles with a command
to get a normal text
or shoul i just take a screen shot and make the bot send this picture
@quaint hornet what i do is look for a unique piece of text before and after the content you want, and use string.split() on both ends
So
i found this npm package who return the lirics i think i can usage this with a translator and do the same result
I'm trying to put the documention on my website and I use <> as required argument but then this happened
more easyer
The <buy> is recognized as a keyword
escape the <>
Wiat what
or encode them
That makes it look weird
lol
not like that
\<buy\>
Doesnt work
>buy< should work
Mk I'm getting a really odd error. This is my code: https://hastebin.com/aqenixasox.py and the error is happening in line 63. Problem is, the file is exactly where it should be. py Ignoring exception in command todo list: Traceback (most recent call last): File "C:\Users\Gamer\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\ext\commands\core.py", line 83, in wrapped ret = await coro(*args, **kwargs) File "C:\Users\Gamer\Desktop\Darkness\cogs\staff.py", line 63, in todo_list with open('to_do.json', 'r') as fr: FileNotFoundError: [Errno 2] No such file or directory: 'to_do.json'
lmao then do it the other way round
ty tho
yep
wait oops
Can someone help 😔
it was 63
So I added padding-top: 120px to my div to lower the div as it was pretty far up and now it looks like this
cannot import name 'default' from 'utils'
basically utils doesnt have a default class / name whatever im no py dev
Also, why would you want to uninstall pip that's weird
Does someone use heroku? (for s question)
Nvm I used padding it should've been margin
i did @jovial nexus but not anymore, i'm switching to a paid vps
const targetMessage = await message.guild.channels.cache.get("728314660859674695").fetch('728607514152665211')
const collector = targetMessage.createReactionCollector(filter, { time: 15000 });
(node:7293) UnhandledPromiseRejectionWarning: TypeError: targetMessage.createReactionCollector is not a function
help
why
@elder loom can you plz come on a vc I'll explain what issue m facing
😏
no u will ip log me 😂 (jkjk)
anyways i can't rn, im tryna play a game
what language ur coding in
That's py
i mean what are u trying
The code was working fine hours ago and once i tried hosting it on heroku the code doesn't work
to accomplish (ik my spelling ispure trash)
Chicken you making a website too? Lol
aha, heroku got me alot of trouble tho
I'm using this tmeplate and this navigates through the website when the user scrolls, I want to disable this if they are on a specific part how would I do thzt?
var o = !0,
a = null;
$(this).on("mousewheel DOMMouseScroll", function(e) {
if (!$(".outer-nav").hasClass("is-vis")) {
e.preventDefault();
var i = e.originalEvent.wheelDelta ? -e.originalEvent.wheelDelta : 20 * e.originalEvent.detail;
i > 50 && o ? (o = !1, clearTimeout(a), a = setTimeout(function() {
o = !0
}, 800), t(1)) : -50 > i && o && (o = !1, clearTimeout(a), a = setTimeout(function() {
o = !0
}, 800), t(-1))
}
}), $(".side-nav li, .outer-nav li").click(function() {
if (!$(this).hasClass("is-active")) {
var t = $(this),
n = t.parent().find(".is-active"),
s = t.parent().children().index(n),
r = t.parent().children().index(t),
o = $(this).parent().children().length - 1;
e(r), i(s, r, o)
}
}), $(".cta").click(function() {
var t = $(".side-nav").find(".is-active"),
n = $(".side-nav").children().index(t),
s = $(".side-nav").children().length - 1,
r = s;
e(s), i(n, r, s)
});
This is the function that detects scrolls and clicks
have you made a folder with a reguirements.txt and a something else
i forgot
there was some nice tutorial for this
Yes Requirements.txt and procfile
okay
All of this is right
Requirements for the same
Yes
Requirements.txt had asyncio discord.py etc
@earnest phoenix awaitReactions or new ReactionCollector
sec
hello,
when i make that {name: '**Region :**', value: region[message.guild.region], inline: true},in my embed i see the region on "undefined" any one can help please thanks
@plain acorn did u put like this
Like how?
git+https://github.com/Rapptz/discord.py
dnspython==1.16.0
PyNaCl==1.3.0
async-timeout==3.0.1
like this
@fading sigil what is region
Yes
srry i just copied that lol
alright
maybe try putting "pandas" under it
when i did that it worked
Okay
my server is on Europe but in the embed my bot say undefined
Letme try@elder loom
sure.
But what is region
Europe
@tulip ledge I think there's something to do with sticky
E.g when the user scrolls to x, the element is toggled to sticky
I have no idea tho
Can someone help me with xp bars btw
Idk the formula
Or how to fill it based on the numbers
only languages i know is c#, roblox lua, lua , a little bit of js and python
xp bars for?
My bot
oh
On canvas
Still getting the samw error@elder loom
what is the error exactly?
Omg copy and paste the error
Traceback (most recent call last):
File "index.py", line 3, in <module>
from utils import default
ImportError: cannot import name 'default'
yes
from utils import default
from utils.data import Bot, HelpFormat
config = default.get("config.json")
print("Logging in...")```
mhm
m loading the config file through it
Some one now how to create a system ticket tool reaction ?
there are many other ways to open a config file
my entire bot is coded on config files just by
import discord
from discord.ext import commands
import praw
import random
import json``` and some other stuff
but it works
but u would probs have to rewrite ur entire code to make it work
idk it's just i'm new to coding bots so i'm just trying my best to help
@light drift what
okay fixed it finally
good
helo halooo, does anyone know how I can center these two columns? im using ccs grid, its only centering the "hmm" column
any ideas
the css: css .container { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; grid-gap: 10px; }
e
@pure lion Need like a message embed have a reaction and create a channel to the user can write put image or other like a system ticket support you now?
?
well uh
<center>
<div class="container">
<button class="first-button"><p class="features">View Features</p></button>
<button><p class="features">hmm</p></button>
</div>
</center>
``` the "center" tag
is it text-align: center
text-align: center; doesn't change anything
🤔
.container {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-auto-rows: 100px;
grid-gap: 10px;
margin: auto;
}```



