#development

1 messages · Page 1063 of 1

earnest phoenix
#

Thx.

#

@rare horizon what help do you need?

#

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

rare horizon
#

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

earnest phoenix
#

Oh

rare horizon
#

No... I don't know.. not here...

#

hahaha

#

I will post the script here... if someone find see something wrong

earnest phoenix
#

I'd go with youtube tutorials my guy

#

Indeed

#

Right now I'm just watching how to code a bot properly

rare horizon
#

{
"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"
]
}

earnest phoenix
#

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

rare horizon
#

sorry, sorry

#

I was installing the node.js

earnest phoenix
#

{
"name": "discordbot",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "Melou",
"license": "ISC"
}

rare horizon
#

it closed my discord

earnest phoenix
#

'_'

#

'_'

#

discord bot is on how many servers?

#

how do i see this?

quasi arrow
#
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

earnest phoenix
#

.,.

sudden geyser
#

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)

quasi arrow
sudden geyser
#

Can you show us some of your code where you were making the embed.

rare horizon
#

just a moment please

slender thistle
#

@earnest phoenix client.guilds is a list of guilds the bot is in

earnest phoenix
#

not using ext

rare horizon
#

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);
}

quasi arrow
#

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']}`
earnest phoenix
#

thx

#

formatation not correct

#

how to correct formatting

sudden geyser
#

Try logging x

earnest phoenix
#

@slender thistle

#

how to correct formatting?

#

hey

slender thistle
#

are you doing print(client.guilds)?

molten summit
#

Sall

earnest phoenix
#

how to get verification on my bot please ?

molten summit
#

Romania

slender thistle
#

-verifybot @earnest phoenix

gilded plankBOT
#

@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.

earnest phoenix
#

count

#

@slender thistle count bot in servers

rare horizon
#

Ok... now I lose who was helping me... lol

slender thistle
#

a built-in function len on the list

earnest phoenix
#

ok

#

len(client.guilds)

slender thistle
#

yup

earnest phoenix
#

omg

#

i love you

#

❤️

sudden geyser
#

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?

quasi arrow
#

using tkinter it's troublesome

#

pyqt5 is good tho

#

@sudden geyser

sudden geyser
slender thistle
#

I've seen plenty of programs written in PyQt5

#

There's a 15-minute-apps that utilizes it iirc

fierce wolf
#

i was trying to do the .setThumbnail and when i try it it's not working is this correct?
.setThumbnail(message.guild.iconURL)

sudden geyser
#

What version of Discord.js are you using.

earnest phoenix
#

I can't get the verification for my robot while I have 75 servers help me

fierce wolf
#

v12

sudden geyser
#

iconURL is a method.

fierce wolf
#

oh ok!!

frigid cave
#

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+)

sudden geyser
#

wdym 76

frigid cave
#

The system message from Discord coming when the bot reach 76 Servers, not on 75

fierce wolf
#

iconURL is a method.
@sudden geyser shall i do .setThumbnail(iconURL) ?

sudden geyser
#

You should keep the message.guild part, except call .iconURL as a method (.iconURL())

delicate shore
#
 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

solemn latch
#

If (!args[1])
Will only run if args[1] is undefined

fierce wolf
#

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 :<

sudden geyser
#

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).

wicked pivot
#
if(args[0]){
      args.toLowerCase()
      return await CheckHasCommand.Check(message, bot, args)
    }``` 
UnhandledPromiseRejectionWarning: TypeError: args.toLowerCase is not a function ![Detente_ref](https://cdn.discordapp.com/emojis/547849405210951708.webp?size=128 "Detente_ref")
earnest phoenix
#

args returns an array

#

You want to toLowerCase() an array facepalm

wicked pivot
#

args sends a string?, toLowerCase acts on the strings right?

earnest phoenix
#

Yea

#

If you want to toLowerCase() the whole args

#

Join them first

#

args.join(" ").toLowerCase()

fierce wolf
#

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).
@sudden geyser
is this the right command?
.setAuthor(message.author.name)

earnest phoenix
#

User doesn't have a name property

sudden geyser
#

^ It has the username property though.

fierce wolf
#

so it's
.setAuthor(message.author.username)
?

earnest phoenix
#

Yeà

sudden geyser
#

Try it out.

fierce wolf
#

okii

earnest phoenix
#

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 Thonk

fierce wolf
#

IT WORKS! but it only has the name how to put there tag?

earnest phoenix
#

just message.author.tag and remove message.author.username

fierce wolf
#

ohh kk how to put there avatar too? (im sorry if i ask so many questions)

earnest phoenix
#

avatar on where tho

#

Author? Thumbnail? Image? Footer?

fierce wolf
#

author

sudden geyser
#

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 Thonk
@earnest phoenix there's no real use for it from what I've seen other than if you want a short statement to end with undefined.

#

I'd just avoid it when I can.

earnest phoenix
#
dynamic: true,
size: 1024,
format: 'png'
}))``` @fierce wolf
#

@sudden geyser well it's useless

sudden geyser
#

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.

earnest phoenix
#

I mean there's literally no benefit or difference however, idk what JavaScript devs was smoking when they added this

fierce wolf
#

on the footer how to put the bot pfp and the dev name?

#

like it's permanent

strange trout
#

Anyone familiar with nuxtjs discord oauth flow

earnest phoenix
#
dynamic: true,
size: 1024,
format: 'png'
}))``` @fierce wolf
fierce wolf
#

ty!

sudden geyser
#

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.

earnest phoenix
#

Little purpose as 0.000000000001%

sudden geyser
#

For example, I think it's used with JavaScript:void(0) on the web

earnest phoenix
#

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

fast yacht
#

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 @username that 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 !rank that 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.
earnest phoenix
#

First might be ok but you gotta ask that to a mod to make sure, but second is not

fast yacht
#

ok , thank you

strange trout
#
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

sick cloud
#

music bots are easy tbh

honest perch
#

lies

earnest phoenix
sick cloud
#

join vc, play opus stream

earnest phoenix
#

very ez

sick cloud
#

add an array for a queue

#

done

earnest phoenix
#

I mean it's easy if you're a proficient, i made mine in 7 hours

sick cloud
#

better than mee6

#

i can do one in an hour or so maybe

earnest phoenix
#

I mean with all the commands

sick cloud
#

yes

#

same

strange trout
#

Easy for a small scale bot but if you want to make it large scale then it's not that easy

sick cloud
#

just cluster it

#

not really hard

earnest phoenix
#

ok then make me a music bot KEKEKW

#

Only thing it needs is just clusters and shards

#

Done

sick cloud
#

pay me

#

i don't make bots for free anger

earnest phoenix
#

im fine then lol

#

OMEGALUL i made 20 bots for free... Oof

strange trout
#

Don't see the hype around music bots anyway

sick cloud
#

they're just a pain

earnest phoenix
#

Wot

sick cloud
#

expensive to run and no better than the next

earnest phoenix
#

@earnest phoenix make that 21 ;P

sick cloud
#

i use YouTube for music

strange trout
#

Same

sick cloud
#

it's not glitchy

earnest phoenix
#

(Main hype is music, after i added music to my bot it grew a little more than it did before) @strange trout

sick cloud
#

my bot is nearly half way to a big milestone

earnest phoenix
#

@earnest phoenix maybe

#

Please? ;P

sick cloud
#

where discord moves it to special sharing

#

sharding*

strange trout
#

Mine is in 500 servers lol

earnest phoenix
#

(Maybe) @earnest phoenix

sick cloud
#

mines in 45,000

strange trout
#

With 3 commands

sick cloud
#

nearly halfway to 100k 😎

earnest phoenix
#

ohhhh when you make better commands than almost any bot does but nowhere near their guild count

strange trout
#

Tonybo do you use nuxt

sick cloud
#

yes, why

strange trout
#

I need help with discord auth

sick cloud
#

what lib

strange trout
#

discord.js

sick cloud
#

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?

strange trout
#

I know lol. Using nuxtjs with nuxtjs-auth

sick cloud
#

i don't know nuxt auth sorry

#

made my own implementation

limber swan
#

I have this issue: TypeError: Cannot read property 'get' of undefined

let serv = req.client.guilds.get(req.params.guildID);```
strange trout
#

ah okay

sudden geyser
#

Don't see the hype around music bots anyway
big agree. it isn't going to sound good anyway due to discord

sick cloud
#

@limber swan client doesn't have guilds property

limber swan
#

To what I change it

strange trout
#

I should probably just make my own implantation as well. I'm pretty sure nuxt auth allows you to make your own schemes though

earnest phoenix
#

@limber swan what's req.client ?
Your bot?

limber swan
#

its exress, dasboard

earnest phoenix
#

Oh then it doesn't have a guilds property, you get guilds from the bot not express

sick cloud
#

nice job

fierce wolf
#
dynamic: true,
size: 1024,
format: 'png'
}))``` 

@earnest phoenix
i know i'm late but it's not working..

            dynamic: true,
            size: 1024,
            format: 'png'
        }))```
raven crystal
#

can someone send a complete programering

earnest phoenix
#

@fierce wolf <client> is your bot whether you defined it as client or bot and IDs are strings not numbers

- ID
+ "ID"```
fierce wolf
#

wait i am confused 0-0 can u try to edit my code?

            dynamic: true,
            size: 1024,
            format: 'png'
        }))```
sorry :< @earnest phoenix
raven crystal
#

iam trying to create a music bot and i need help with the commands

torn ravine
#

@raven crystal learn a language and then do the funny coding thing

raven crystal
#

can you help me start or how do i learn it?

sudden geyser
#

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.

raven crystal
#

okey i dont understand. thanks anyways

vague kite
#

Is there a way to manually restart a specific shard in Discordjs?

earnest phoenix
#

there has to be somehow but i dont know shit about discord.js sharding so i dont know how to

vague kite
#

I know there was triggerReady() in v11 but couldn't find anything for v12

feral aspen
#

Hello Guys.

tight plinth
#

how can i make a script execute once every month, even if the bot restarts?

feral aspen
#

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.

tight plinth
#

erm

#

dont use json as db

earnest phoenix
#

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.writefile to a json file with his name, and his id.
@feral aspen that is stupid in 2 ways

  1. You are not allowed to log a persons information w/o their knowledge
  2. Dont use a json db
tight plinth
#

hmmm

slender thistle
#

That falls under user consent so they are allowed to store the user name and ID

feral aspen
#

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

slender thistle
#

Only if the user executes a command and that you are transparent about it

feral aspen
#

Yes..

slender thistle
#

I don't see why you need to store that though

feral aspen
#

Like money systems.

earnest phoenix
#

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`)
feral aspen
#

on txt?

earnest phoenix
#

thats js code you can use to write the file

#

put that in your command handler for the command help

feral aspen
#

I will be trying.

#

One sec.

#

By the way

#

Which is more safer to store in

#

Json files or txt?

slender thistle
#

Neither

#

It's still just a file in the end, just with a different extension

feral aspen
#

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, }
earnest phoenix
#

Can anyone help me with html/css

feral aspen
#

how can I fix that?

earnest phoenix
robust moth
#

@feral aspen use \n

earnest phoenix
#

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

fierce wolf
#

so when i close my VS Code my bot turns out offline how to fix it?

earnest phoenix
#

you dont run your bot on vs code

digital ibex
#

get a host

earnest phoenix
#

get a vps, transfer the code to there and run it on there

fierce wolf
#

how?

earnest phoenix
#

Constan

#

u help or no

#

Im trying rn

#

oh ok

feral aspen
#

Hey

earnest phoenix
#

For your login form, transform: translate(0,-25%); seems to work fine @earnest phoenix

feral aspen
#

fs.appendFileSync("./logfile.txt",`Username: ${message.author.tag}; ID: ${message.author.id};\n`) works but if someone does it twice, it logs twice...! 😦

earnest phoenix
#

thats called logic

feral aspen
#

how can I make it that if someone isnt logged there, then new log.

#

and if logged, then DONT log

earnest phoenix
#

you check if the file contains the text that you wanna log

fierce wolf
#

after when im on the site what's next?

earnest phoenix
#

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

feral aspen
#

Thanks @earnest phoenix 🙂

earnest phoenix
#

onto the style of the button you want to change @earnest phoenix

fierce wolf
#

wait is vps free?

earnest phoenix
#

sometimes yes

#

but these vps arent usually good

fierce wolf
#

i used google.

earnest phoenix
#

to get a free hosting service, I'd recommend heroku, combined with uptimerobot to keep it alive

feral aspen
#

I recommend Digital Ocean.

earnest phoenix
#

No do not use heroku

feral aspen
#

Im about to host my bot there.

#

Heroku is not good.

earnest phoenix
#

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

feral aspen
#

I use Digital ocean.

#

🙂

stiff stream
#

need help

earnest phoenix
#

Amazon Aws better

stiff stream
#

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)
?

earnest phoenix
#

but digital is good

feral aspen
#

🙂

#

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?

earnest phoenix
#

microsoft azure ftw

fierce wolf
#

damn, all this websites has prices but it's usd it's not my money 0-0

stiff stream
#

like if i type my command and like: prefix command (hey hey)

it will send it like this:('hey' 'hey')

feral aspen
#

Make it 'hey' + 'hey'

earnest phoenix
#

who pinged me?

lusty quest
#

digital is fine. pretty stable and ok pricing. (also got my DB cluster running there and moving it is annoying)

stiff stream
#

Make it 'hey' + 'hey'
@feral aspen yeah but i forgot how to make the arg... can someone make and send me the command

feral aspen
#

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

stiff stream
#

ty

feral aspen
#

I think its correct

#

wait

lusty quest
#

@vague kite you need to send it across the shards with brodcast eval

feral aspen
#
if(args[0] === 'hey') return;```
plain acorn
#

Can someone help me m getting error on heroku

earnest phoenix
#

what error

fierce wolf
#

wait how do you make say command?
EXAMPLE:
{prefix}say hi i'm cute uwu

stiff stream
#

ty

feral aspen
#

np

earnest phoenix
#

@fierce wolf you get the args, you join them and reply with that string

plain acorn
#

ImportError: cannot import name 'default' @earnest phoenix

fierce wolf
#

@fierce wolf you get the args, you join them and reply with that string
@earnest phoenix what is the code?

earnest phoenix
#

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

stiff stream
#

@feral aspen but what i put in the 'hey'.. i meant that no matter what i type it will say it in 'this'

plain acorn
#

are there other free hosting available ? other than heroku?

feral aspen
#

are there other free hosting available ? other than heroku?
@plain acorn nope

stiff stream
#

@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 ?

earnest phoenix
#

permission banned?

#

help

feral aspen
#

@stiff stream ?
@stiff stream I didn't understand, sorry!

plain acorn
#

wow spongerino

stiff stream
#

if i type something no matter what, the bot will send it with " " in the sides
@feral aspen

earnest phoenix
#

if message.author.server_premission.administrator:

#

help

green kestrel
#

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

stiff stream
#

if i type something no matter what, the bot will send it with " " in the sides
@feral aspen
@stiff stream ?

slender thistle
#

guild_permissions

green kestrel
#
<?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)");```
earnest phoenix
#

hm

green kestrel
#

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

stiff stream
#

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

green kestrel
#

and then that builds a table that i then output with this:

stiff stream
#

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

quaint hornet
#

you can try get all arguments of the message and

#

'"'+arguments.join(' ')+'"'

earnest phoenix
#

ban_members?

quaint hornet
#

and you can create arguments simply

slender thistle
#

N3RD, what are your questions exactly?

#

Could you please start being more specific about what is erroring out?

quaint hornet
#

arguments = msg.toString().split(" ")

feral aspen
#

N3RD, what are your questions exactly?
@slender thistle He is willing to get the code for the ban members.

stiff stream
#

please someone that know how to make commands good say 1

quaint hornet
#

arguments.shift() //this will remove the comand and prefix of message

stiff stream
#

i got a question

earnest phoenix
#

I want to put permission on the ban only for adm.

stiff stream
#

please

feral aspen
#

He answered your question

stiff stream
#

where?

feral aspen
#

I want to put permission on the ban only for adm.
@earnest phoenix Ok wait

stiff stream
#

where?
@stiff stream ?

earnest phoenix
#

not using ext

slender thistle
feral aspen
#

@earnest phoenix Use this command

#
)```
stiff stream
#

@feral aspen where?

earnest phoenix
slender thistle
#

Starting from discord.py versions 1.0.0 and further, anything server is guild

earnest phoenix
#

ok

quaint hornet
#

so you code can be like

let arguments = msg.toString().split(" ")
arguments.shift()
msg.channel.send('"'+arguments.join(" ")+'"')
slender thistle
#

NO

#

NO NO NO

#

Please

quaint hornet
#

?

feral aspen
#

What?

slender thistle
#

discord.Guild.ban IS WRONG

quartz kindle
#

such chaos in here

feral aspen
#

What's wrong?

#

discord.Guild.ban IS WRONG
@slender thistle Who wrote that?

stiff stream
#

@feral aspen please answer. where he answered ?

slender thistle
#

You are supposed to access an instance of a Guild, not the class itself

quartz kindle
#

@stiff stream all of space_interprise's messages were for you

quaint hornet
#

i think is offencise that last message of your code @earnest phoenix

quartz kindle
#

read them all

feral aspen
#

@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]

stiff stream
#

ok i read them but i dont know how. can someone please make the command and send it to me?

quartz kindle
#

@feral aspen are you giving javascript code to someone using python?

slender thistle
#

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

quaint hornet
#

@stiff stream its hard do that because we dont know how you bot work

quartz kindle
#

^ also spoon feeding

feral aspen
#

@feral aspen are you giving javascript code to someone using python?
@quartz kindle ohh.. oh god. woops

plain acorn
#

had someone here hosted bot on heroku?

#

ImportError: cannot import name 'default'

slender thistle
#

Oh, and... guild.ban only accepts a User or a Member

plain acorn
#

need help

earnest phoenix
#

i am brazilian

#

):

#

sorry

quartz kindle
#

mais um br kkkk lul

earnest phoenix
#

Hi everyone, does anyone know how I do a setprefix command? to change the bot prefix from discord with a command

slender thistle
#

You don't need to re-send the question not even a minute after you sent it the first time

fading sigil
#

hello,
How do you get the variable for user badges?

earnest phoenix
#

sorry

quartz kindle
#

global prefix or per guild prefix?

earnest phoenix
#

global

slender thistle
#

@fading sigil What library?

fading sigil
#

js

#

discord.js

quartz kindle
#

make a command that changes your prefix variable, then update your config.json if you have one

#

where is your prefix stored?

earnest phoenix
#

in the config.json

#

i made it with discord.js

quartz kindle
#

then my message above is the answer

slender thistle
earnest phoenix
#

thanks @quartz kindle

fading sigil
#

thanks

digital ibex
#

hey guys quick question

#

i recently got sublime text3 and im wondering how i can put an image in a .png image, any ideas?

quaint hornet
#

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.

digital ibex
#

imo doesn't really depend on the commands, depends on the functionality and flexibility

quaint hornet
#

what do you mean? (sorry for the english, im 🇧🇷 )

quartz kindle
quaint hornet
#

pse

digital ibex
#

just like make it good and with no bugs or something lol

stiff stream
#

something is wrong with my command

#

who can help?

quaint hornet
#

can you please say what command and what is going wrong?

digital ibex
#

what do u need?

stiff stream
#

can i send it in DMs?

quaint hornet
#

why dont you send it here?

stiff stream
#

its a picture

#

oh i can send here

quaint hornet
#

you have no permission?

stiff stream
#

k

#

see this?

digital ibex
#

yeah?

quaint hornet
#

is this python?

stiff stream
#

no js

slender thistle
#

JS

stiff stream
#

and i want it to not way turn in the message

#

how?

slender thistle
#

There's no switch statements in Python and you can't declare variables like let X

digital ibex
#

whats wrong with it?

slender thistle
#

@stiff stream Do you want to remove the " "?

stiff stream
#

no

#

i want it to not say turn

#

turn is the name of the command

digital ibex
#

slice the args

#

args.slice(1).join

stiff stream
#

where?

digital ibex
#

u have args.join

#

use args.slice(1).join

#

instead

stiff stream
#

now it should work?

digital ibex
#

yes

#

but try it

stiff stream
#

let me see

#

ty

#

worked

#

ty ty

digital ibex
#

nice

stiff stream
#

and i got one more question

#

that i dont think if possible

quaint hornet
#

?

stiff stream
#

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

#

?

quaint hornet
#

sho you want to it reply the line breaks too

digital ibex
#

send it on a new line?

quaint hornet
#

?

stiff stream
#

?

#

no

digital ibex
#

u can args.slice(1).split(',').join('\n') ?

stiff stream
#

ok

#

where do i put that

digital ibex
#

what

stiff stream
#

u can args.slice(1).split(',').join('\n') ?
@digital ibex

digital ibex
#

do you even know what that does?

stiff stream
#

nope

digital ibex
#

uh

stiff stream
#

im new to codes

digital ibex
#

probably should learn javascript

#

i can help you

quaint hornet
#

wait

honest perch
#

what happened to fs?

#
digital ibex
#

nothing

quaint hornet
#

split does only work on string?

honest perch
#

obviously something happened

#

because it doesnt exist

digital ibex
#

its built into nodejs

#

nothing happened

honest perch
#

oh lmao

digital ibex
#

wdym space interprise?

stiff stream
#

@digital ibex @quaint hornet look

#

see this

#


?

digital ibex
#

yeah?

stiff stream
#

i want it to send each one of them in " ",

digital ibex
#

then join them in "\n"

#

i think

quaint hornet
#

args.slice(1).split(',').join
array^ ^string ?

digital ibex
#

u can split a string

#

if thats what ur saying

stiff stream
#

@digital ibex like this?
args.slice(1).join"\n"

#

?

digital ibex
#

no

#

join is a function

quaint hornet
#

join("\n")

#

functions need to have a () to be called

#

and insed the () you can put arguments

stiff stream
#

can someone send me the command

#

im not that good

#

sorry

quaint hornet
#

if the function need arguments you have to put they inside the ()

#

(argument)

#

ok let me do that

stiff stream
#

k

sand ginkgo
paper phoenix
#

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.

quaint hornet
#
//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

stiff stream
#

me?

quartz kindle
quaint hornet
#

yes

stiff stream
#

ty

quartz kindle
#

enconded

solar pivot
#

I've got a wee odd problem

stiff stream
#

oh and i got a problem that no one here know how to fix

sand ginkgo
#

Is writing url Must be deleted? @quartz kindle

solar pivot
#

nvm

quaint hornet
#

what problem?

quartz kindle
#

@sand ginkgo no...

#

you wrote enconded

stiff stream
#

oh and i got a problem that no one here know how to fix

quaint hornet
#

what problem? @stiff stream

stiff stream
#

i got a giveaway command

#

and its use JSON

#

and because heroku have a problem with JSON

sand ginkgo
#

Where to put it? @quartz kindle

stiff stream
#

the giveaway timer if its more then 1 day its stopping it in the middle or something

quartz kindle
#

@sand ginkgo you misspelled it

sand ginkgo
#

Bruhhh

quaint hornet
#

i think the heroku is restarting you bot or stopping the time because it is soo long

sand ginkgo
#

Where i put enconded? @quartz kindle

quartz kindle
#

dude....

stiff stream
#

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

quartz kindle
#

you misspelled it, you wrote it wrong

quaint hornet
#

i dont know, i never use heroku before

quartz kindle
#

its not enconded

#

its encoded
from "code", "to encode", not "conde", not "to enconde", that doesnt exist

pure lion
stiff stream
#

@quaint hornet thats what my friend told me to do

sand ginkgo
#

Okay @quartz kindle

quaint hornet
#

he is telling you to use some database service like mongo db

sand ginkgo
#

ty

pure lion
#

Also tf happened here

#

Mongoose is the best option imo

stiff stream
#

he is telling you to use some database service like mongo db
@quaint hornet how?

quaint hornet
#

i think

pure lion
#

@stiff stream with mongoose, you can just link back and front to the same db

quaint hornet
#

mongo db have a tutorial for that i think

pure lion
#

I think

quaint hornet
#

@stiff stream this tutorial should help you

stiff stream
#

k

#

ty

pure lion
#

Me when the k:
notlikenoot

digital ibex
#

does anyone know how I can move the button down?

#

i tried margin-top: 10px; but it doesn't change

quaint hornet
#

how is your css?

vague imp
#

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

digital ibex
#

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;
plain acorn
#

ImportError: cannot import name 'default'

This error is showing on heroku terminal need help

stiff stream
#

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

#

?

solar pivot
#
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

digital ibex
#

whats above it?

solar pivot
#

this

#

;-;

digital ibex
#

r u just sending un ?

earnest phoenix
#

lol skid

solar pivot
#

yes

#

if the message is just "un" it does it

quartz kindle
#

@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

solar pivot
#

i'm just using that to test out if its working

#

but it isn't working

digital ibex
#

add an else statement and in that statement log message.content

solar pivot
#

ight

earnest phoenix
#

put that above the if(message.content.startwith(prefix) @solar pivot

digital ibex
#

oh im dumb 🤦‍♂️

solar pivot
#

oh lol

digital ibex
#

so uh

#

anyone know my issue?

delicate shore
#

Can anyone help me with this ?

digital ibex
quartz kindle
#

announcement channels are part of the developer license afaik

sand ginkgo
delicate shore
#

The announcement

digital ibex
#

a menu button? or settings

#

i think

delicate shore
#

announcement channels are part of the developer license afaik
@quartz kindle
Really

quartz kindle
#

its called a hamburger menu/button

digital ibex
#

oh yeah

delicate shore
#

Guys wish me luck

#

My exams tomorrow

#

🤞

quartz kindle
#

good luck pcgamer

delicate shore
#

PG*

#

Thanks

quartz kindle
#

:^)

digital ibex
#

tim, any ideas how i can move a button with css?

quartz kindle
#

you want to move it to the line below?

#

use display:block

digital ibex
#

move it towards the bottom

#

o ok

#

1 sec

#

that puts the button

#

the arrow is where im trying to put it btw

solemn latch
#

gl with that KEKW

sand ginkgo
earnest phoenix
#

<center> html tag or text-align:center on the parent object

sand ginkgo
#

Hmm

fast yacht
#

@sand ginkgo it's called hamburger menu

digital ibex
#

thanks lol

sand ginkgo
#

Bruhh @fast yacht

digital ibex
#

constantin, i was trying to do the same thing too, any ideas how i can move it down?

sand ginkgo
#

<center> html tag or text-align:center on the parent object
@earnest phoenix Can be demonstrated as what. I just understood about the website :/

earnest phoenix
#

margin-top: for not good or position:absolute;top:<something> for good @digital ibex

digital ibex
#

kk thanks

sand ginkgo
#

Hmm

digital ibex
#

wdym by "good" ?

earnest phoenix
#

the first one is more ugly

pure lion
#

x)

#

Consatan can you help me with web design too

digital ibex
#

first one is more ugly? kek

earnest phoenix
#

Okay maybe you should use margin-top in that case

digital ibex
#

margin-top doesn't move it

earnest phoenix
#

set it to like 50px to see the effect

pure lion
digital ibex
#

nothing, i done 4 and 40

#

both stayed the same

earnest phoenix
#

the fuckeroo

pure lion
#

Fuckadoodledo

earnest phoenix
#

then there is one more thing that you could try

digital ibex
#

oh

earnest phoenix
#

which is a big nono but last resort method

#

<br> spam

pure lion
#

:o

#

x)

earnest phoenix
#

ill tell you its a pain to reposition but

digital ibex
#

i done css positon: relative; margin-top: 50px;

earnest phoenix
#

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.

digital ibex
#

and it worked

earnest phoenix
#

oh ok

pure lion
#

Aaaaa

earnest phoenix
#

bruh

#

lemme restart my pc

pure lion
#

What card is that?

#

Potato 3000

earnest phoenix
#

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

pure lion
#

Use a different bin

earnest phoenix
#

y

#

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

digital ibex
#

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

earnest phoenix
#

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.

quaint hornet
#

someone know how can i make my bot resolve math expressions like x²+10x+25

still merlin
#

What even is Code . @earnest phoenix

quaint hornet
#

it opens the current folder on visual studio code

earnest phoenix
#

What even is Code . @earnest phoenix
@still merlin I typed code .

#

node .

#

Not code .

#

:/

quaint hornet
#

code . its the command to open the current terminal folder on visual studio code

earnest phoenix
#

It is.

digital ibex
#

any ideas, anyone?

quaint hornet
#

the problem isnt the comand code .

#

its your visual studio code

#

some bug is making he dont render the ui

#

causing the black screen

earnest phoenix
#

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

quaint hornet
#

your visual studio code has the extension for your language

#

he adjusts the tab spaces amount

earnest phoenix
#

oh-

quaint hornet
#

depending of the extension

earnest phoenix
#

{
"name": "discordbot",
"version": "1.0.0",
"description":
"main": "main.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "Melou",
"license": "ISC"
}

quaint hornet
earnest phoenix
#

Actually I already have that installed

#

Is there something I forgot to enable for it to work?

quaint hornet
earnest phoenix
#

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

quaint hornet
#

so the bot send a message and react the message with emojis

earnest phoenix
#

No

#

ok

quaint hornet
#

and when you click on the reaction it do something?

earnest phoenix
#

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

quaint hornet
#

id?

earnest phoenix
#

If you want ID, do it with a custom emote

quaint hornet
earnest phoenix
#

custom ??

quaint hornet
#

yes

earnest phoenix
#

👍

#

just do \:emote_here:

#

i want to get Thumb up id

#

\👍

#

IDs don't exist for default emotes afaik

quaint hornet
#

if i am not wrong i think you can parse this simbol in your code

#

like

earnest phoenix
#

also Space with that screenshot you sent earlier it didn't really help

#

I'm not sure what to do still

quaint hornet
#
msg.channel.send("👍 look a hand!")
earnest phoenix
#

ok

#

cuz I don't do \t to do tabs

#

thx

#

yep that'll work

#

smh

#

that I was using "\t"?

quaint hornet
#

sorry 𛲢_L i dont program python so i send this part who says some of problems

earnest phoenix
#

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

tulip ledge
#

When I get a website template from online am I allowed to tamper with the code and change up some stuff and add stuff?

quartz kindle
#

you have to read their license

plain acorn
#
ImportError: cannot import name 'default'

This error is showing on heroku terminal need help @pure sun

tight plinth
#

@plain acorn default is a reserved name in js

tulip ledge
#

Alright

plain acorn
#

@plain acorn default is a reserved name in js
@tight plinth my code is in python

pure sun
#
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

tight plinth
#

@plain acorn in almost every programming language default is a reserved name

pure sun
#

or you didnt added anything in requirements.txt

tight plinth
#

It means that you can't create a variable with the name "default"

plain acorn
#

maybe you messed up in Procfile
@pure sun how so

#

or you didnt added anything in requirements.txt
@pure sun i did

wild adder
#

O

plain acorn
#

@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

quaint hornet
#

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

#

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

lusty quest
#

anyone here got a explanation about how to write regex strings? want to replace <> for disabeling the ability to ping roles with a command

quaint hornet
#

to get a normal text

#

or shoul i just take a screen shot and make the bot send this picture

quartz kindle
#

@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

quaint hornet
#

but isnt a unic text

#

every line is a diferent text

quartz kindle
#

i mean, a unique identifier

#

in the html

tulip ledge
#

So

quaint hornet
#

i found this npm package who return the lirics i think i can usage this with a translator and do the same result

tulip ledge
#

I'm trying to put the documention on my website and I use <> as required argument but then this happened

quaint hornet
#

more easyer

tulip ledge
#

The <buy> is recognized as a keyword

amber fractal
#

escape the <>

tulip ledge
#

Wiat what

amber fractal
#

or encode them

quaint hornet
#

< buy >

#

?

tulip ledge
earnest phoenix
#

lol

amber fractal
#

not like that

quaint hornet
#

\<buy\>

tulip ledge
#

Doesnt work

amber fractal
#

&gt;buy&lt; should work

earnest phoenix
#

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'

tulip ledge
#

Its the wrong way around lmao

#

Now its >buy<

amber fractal
#

lmao then do it the other way round

tulip ledge
#

ty tho

amber fractal
#

yep

earnest phoenix
#

wait oops

plain acorn
earnest phoenix
#

it was 63

tulip ledge
#

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

elder loom
#

@plain acorn i'd like to help but i can't even read that

#

well barely

earnest phoenix
#

cannot import name 'default' from 'utils'

#

basically utils doesnt have a default class / name whatever im no py dev

gusty oracle
#

Also, why would you want to uninstall pip that's weird

jovial nexus
#

Does someone use heroku? (for s question)

tulip ledge
#

Nvm I used padding it should've been margin

elder loom
#

i did @jovial nexus but not anymore, i'm switching to a paid vps

earnest phoenix
#
        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

plain acorn
#

@elder loom can you plz come on a vc I'll explain what issue m facing

pure lion
#

😏

elder loom
#

no u will ip log me 😂 (jkjk)

plain acorn
#

🙂

#

😔

elder loom
#

anyways i can't rn, im tryna play a game

plain acorn
#

Okay

#

I'm gonna bang my head now

elder loom
#

what language ur coding in

pure lion
#

That's py

elder loom
#

i mean what are u trying

plain acorn
#

The code was working fine hours ago and once i tried hosting it on heroku the code doesn't work

elder loom
#

to accomplish (ik my spelling ispure trash)

pure lion
#

Chicken you making a website too? Lol

elder loom
#

aha, heroku got me alot of trouble tho

tulip ledge
#

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

elder loom
#

have you made a folder with a reguirements.txt and a something else

#

i forgot

#

there was some nice tutorial for this

plain acorn
#

Yes Requirements.txt and procfile

elder loom
#

okay

plain acorn
#

All of this is right

elder loom
#

and what did u put in procfile?

#

not with the [] btw

plain acorn
#

and what did u put in procfile?
@elder loom

worker: python3 index.py

elder loom
#

yes that

#

alright

#

and in the requirement.txt?

plain acorn
#

Requirements for the same

elder loom
#

like

#

ur coding a bot right

plain acorn
#

Yes

elder loom
#

so if you do some stuff

#

you put some imports

#

like

plain acorn
elder loom
#

import praw

#

mhm

pure lion
#

@earnest phoenix awaitReactions or new ReactionCollector

elder loom
#

sec

fading sigil
#

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

elder loom
#

@plain acorn did u put like this

plain acorn
#

Like how?

elder loom
#

git+https://github.com/Rapptz/discord.py
dnspython==1.16.0
PyNaCl==1.3.0
async-timeout==3.0.1

#

like this

pure lion
#

@fading sigil what is region

plain acorn
#

Yes

elder loom
#

srry i just copied that lol

#

alright

#

maybe try putting "pandas" under it

#

when i did that it worked

plain acorn
#

Okay

fading sigil
#

my server is on Europe but in the embed my bot say undefined

plain acorn
#

Letme try@elder loom

elder loom
#

sure.

pure lion
#

But what is region

tulip ledge
fading sigil
#

Europe

pure lion
#

@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

tulip ledge
#

I have no idea either

#

I was hoping tim would be here

pure lion
#

Can someone help me with xp bars btw

#

Idk the formula

#

Or how to fill it based on the numbers

elder loom
#

only languages i know is c#, roblox lua, lua , a little bit of js and python

#

xp bars for?

pure lion
#

My bot

elder loom
#

oh

pure lion
#

On canvas

plain acorn
#

Still getting the samw error@elder loom

elder loom
#

what is the error exactly?

pure lion
#

Omg copy and paste the error

plain acorn
#
Traceback (most recent call last):
  File "index.py", line 3, in <module>
    from utils import default
ImportError: cannot import name 'default'

elder loom
#

so

#

the heroku stuff is going fine

#

but that's the issue

plain acorn
#

yes

elder loom
#

where are you using this 'default' for

#

and is it necessary

#

to be imported

plain acorn
#

from utils import default
from utils.data import Bot, HelpFormat

config = default.get("config.json")
print("Logging in...")```
elder loom
#

mhm

plain acorn
#

m loading the config file through it

light drift
#

Some one now how to create a system ticket tool reaction ?

elder loom
#

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

pure lion
#

@light drift what

plain acorn
#

okay fixed it finally

elder loom
#

good

digital ibex
#

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; }

elder loom
#

e

light drift
#

@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?

solemn latch
#

align center?

#

🤔

digital ibex
#

?

#

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
crimson vapor
#

is it text-align: center

digital ibex
#

text-align: center; doesn't change anything

pure lion
#

style="text-align: center;"

#

Weird

solemn latch
#

try margin: auto;

#

on the div

digital ibex
#

kk

#

nope

solemn latch
#

🤔

digital ibex
#
.container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 100px;
    grid-gap: 10px;
    margin: auto;
}```
pure lion
#

Lost, which tag are you centering on?

#

Ah

digital ibex
#

wdym?

#

this? ```html
<center>
<div class="container">
<button class="first-button"><p class="features">View Features</p></button>
<button><p class="features">hmm</p></button>
</div>
</center>