#development
1 messages ยท Page 1006 of 1
HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
See https://devcenter.heroku.com/articles/buildpacks
! Push failed```
ball
@restive pebble
its becuz u donnt have any oackage.json
how do purge commands work?
package.json
xD
bulkDelete
o a c k

I don't understand any single word @restive pebble
its a number element
read the docs
good idea
I did
@restive pebble solution
where in the docs is it
and it dosent require any api key

listing to me buddy
@restive pebble solution
@earnest phoenix create a package.json
weit

:(
aa!slipe ;olalldsoafpe

@restive pebble any tutorial on YouTube ?
u even know what ytdl does
@delicate shore are u trying to make music bot?
yus
ytdl simply plays from url
uh

it has some tutorials on web
import yts from "yt-search"
yts({query:"oh my god by alec benjamin"})
best way is to webscrap
it has no limits

@restive pebble nice to meet you
nice
@delicate shore https://medium.com/free-code-camp/how-to-create-a-music-bot-using-discord-js-4436f5f3f0f8
take a look
@restive pebble how to host my glitch.come coding in heroku
sorry but my english is so weak

@earnest phoenix by hosting it there
yuss
2020-06-30T08:38:08.485176+00:00 heroku[web.1]: Stopping process with SIGKILL
2020-06-30T08:38:08.509421+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2020-06-30T08:38:08.579513+00:00 heroku[web.1]: Process exited with status 22
2020-06-30T08:38:08.642541+00:00 heroku[web.1]: State changed from starting to crashed```
this issue showing

what is solution

@restive pebble pls help me more
In docs it's written easy to use
That is it
@restive pebble
so i was looking at the oauth docs because i found the prompt=none thing (love that btw)
and found this https://discord.com/developers/docs/topics/oauth2#state-and-security
I was thinking of implementing it but i wanna make sure i get it right
i could be getting the logic completely wrong so just lmk. the first thing i thought abt was creating a state when requesting/api/authwhich redirects to the authorize page. so creating a token there sending it along and then checking it when it receives the/api/auth/callback?
something feels not right about this and i've a feeling its more complicated so do let me know
@slim heart little bump maybe someone could help
@slim heart
2020-06-30T08:38:08.485176+00:00 heroku[web.1]: Stopping process with SIGKIL
2020-06-30T08:38:08.509421+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2020-06-30T08:38:08.579513+00:00 heroku[web.1]: Process exited with status 22
2020-06-30T08:38:08.642541+00:00 heroku[web.1]: State changed from starting to crashed```
bruh
Pls
@delicate shore https://medium.com/free-code-camp/how-to-create-a-music-bot-using-discord-js-4436f5f3f0f8
@restive pebble
@earnest phoenix
it looks like u have added package.json
but heroku will need Procfile
hey! im getting this error
SyntaxError: await is only valid in async function```
this is my code:
```const Discord = require('discord.js')
module.exports = {
name: 'purge',
description: "this is a purge command!",
execute(Discord, bot, message, args){
const amount = args.join(' '); // Amount of messages which should be deleted
if (!amount) return message.channel.send('You haven\'t given an amount of messages which should be deleted!');
if (isNaN(amount)) return message.channel.send('The amount parameter isn`t a number!');
if (amount > 100) return message.channel.send('You can`t delete more than 100 messages at once!');
if (amount < 1) return message.channel.send('You have to delete at least 1 message!');
await message.channel.messages.fetch({ limit: amount }).then(messages => {
message.channel.bulkDelete(messages
)});
```
its not async
how do I make it async
use callbacks
what no just put async in front of the function
async execute(Discord, bot, message, args){
i see u have
do I make module.exports require async?
.then
async function(){
m
uhh
okok
.then do not require await
its discordapi limit
async/await is not something you import, it's a language feature
and u cannot delete messages over 2 weeks old
async/awaitis not something you import, it's a language feature
@cinder patio bruh
i meant he dosent need await if he already has .then
I was not talking to you
message.channel.bulkDelete(messages
)});```
@restive pebble do u know how make this send something after the messages are dleted?
I guess I have to
message.channel.send(`deleted ${amount} of messages including the command`)
but where do I put it?
@restive pebble
@restive pebble one thing where do i run commands like they did mkdir musicbot && cd musicbot
and
touch index.js && touch config.json
.then
@restive pebble one thing where do i run commands like they did mkdir musicbot && cd musicbot
and
touch index.js && touch config.json
@delicate shore i just sent u the link to u to see how to use yt-search
const songInfo = await ytdl.getInfo(args[1])
ah u dont need yt search for that @delicate shore
can someone tell what is wrong
or this
` if (command === 8ball) {
if(!args[2]) return message.reply("Please ask a full question!")
let replies = ["Yes.", "No.", "I don't Know", "Ask again later"];
let result = Math.floor(Math.random() * replies.length);
let question = args.slice(1).join(" ");
let ballembed = new Discord.RichEmbed()
.setAuthor(message.author.tag)
.setColor("#FF9900")
.addField("Question", question)
.addField("Answer", replies[result]);
message.channel.send(ballembed);
`
whats the output or error
Im new to command handlers
but I bet this should work
it worked 1 min ago and I changed nothing
do I make it execute(Discord, bot, message, args)?
lemme try
i am not able to sign in to digital ocean idk is the server down
no
ah u dont need yt search for that @delicate shore
@restive pebble Thne how
idk
fs.readdir('./events/', (err, files) => {
if (err) return console.error;
files.forEach(file => {
if (!file.endsWith('.js')) return;
const evt = require(`./events/${file}`);
let evtName = file.split('.')[0];
console.log(`Loaded event '${evtName}'`);
client.on(evtName, evt.bind(null, client));
});
});
``` Any idea why this works on Windows but fails on linux (evt.bind is not a function; NodeV12.18.1; Djs V12)
this ok
nvm found the issue
What was the issue?
@restive pebble one ques i got all code for index ok
but what to do of this
const {
prefix,
token,
} = require('./config.json');```
it cant load the event bcs there is no export
this is ur bot prefix
no
and bot tokwn
write those in the root
root
can't i use env
I m using these codes for sending a user message in dm by using user id but it evertime says can't find user - ``` client.on('message', async message => {
if(message.content.startsWith(prefix + "dm")) {
const args = message.content.split(" ").slice(1);
let dUser = message.mentions.users.first() || message.guild.members.cache.get(args[1]);
if (!dUser) return message.channel.send("Can't find user!")
if(!message.member.hasPermission("ADMINISTRATOR")) return message.reply("You can't you that command!")
let dMessage = args.join(" ").slice(22);
if(dMessage.length < 1) return message.reply('You must supply a message!')
dUser.send(`${dUser} A moderator from Discord Profie sent you: ${dMessage}`)
message.author.send(${message.author} You have sent your message to ${dUser})
}
help me out
my ytdl stream always stops, for no reason and without error-message, playing music. Anybody having the same issue?
@hidden lynx does it play for some time?
yes it does
i think i also depends on what is playing. If the song is longer it also streams longer
discord.js?
does it throws error?
its not ytdl related
becuz ytdl returns stream
so when someone writes .spawn it spawns a pokemon
but when they write .catch it catches the most recent pokemon spawned on the whole bot but i want it so it only catches the pokemon in the channel it was spawned in
probably something to do with this
nice if nesting xD
don't they have to mention the pokemon's name?
whats the variable mon
v11 or 12
And I think that user id should be in args[0] not 1 since you sliced the prefix and command name
can someone help me start using a data base?
@long yew check this out https://www.w3schools.com/nodejs/nodejs_mysql.asp
you can simply use the mysql node module
Can I send a local file in embed?
https://stackoverflow.com/questions/41189796/discord-js-message-attachments-picture this should work
message.channel.sendMessage(text).attachments
["",{url:"http://openweathermap.org/img/w/"+icon+".png" }];
I made some bot, with node-js ( discord.js ).
I want to send message with picture(without...
Hey. I found this in the Discord documentation :
API_ENDPOINT = 'https://discord.com/api/v6'
CLIENT_ID = '332269999912132097'
CLIENT_SECRET = '937it3ow87i4ery69876wqire'
REDIRECT_URI = 'https://nicememe.website'
def exchange_code(code):
data = {
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
'grant_type': 'authorization_code',
'code': code,
'redirect_uri': REDIRECT_URI,
'scope': 'identify email connections'
}
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
r = requests.post('%s/oauth2/token' % API_ENDPOINT, data=data, headers=headers)
r.raise_for_status()
return r.json()
What is def ? I've never seen that...
stands for define. basically thats how you define a function in python
Ow..
So can I do :
API_ENDPOINT = 'https://discord.com/api/v6'
CLIENT_ID = '332269999912132097'
CLIENT_SECRET = '937it3ow87i4ery69876wqire'
REDIRECT_URI = 'https://nicememe.website'
var exchange_code(code):
data = {
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
'grant_type': 'authorization_code',
'code': code,
'redirect_uri': REDIRECT_URI,
'scope': 'identify email connections'
}
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
r = requests.post('%s/oauth2/token' % API_ENDPOINT, data=data, headers=headers)
r.raise_for_status()
return r.json()
And after use exchange_code(mycode); ?
What
@blazing portal
you probably cant just change 1 line xD and convert .py to .js
It's in "py" ! ?
lol
xD
It's for that .. x')
Yes it's python if you haven't noticed
how to catch discord.ext.commands.errors.MissingRequiredArgument in py
I've never developped in Python, so.. :)
using excrpt
Global error handler?
except?
You shouldn't copy things right from the dev page anyways
try except
is there anything wrong in this?
const {token} = require('./config.json');
const fs = require('fs');
client.commands = new Discord.Collection();
const commandFiles = fs.readdirSync(`./Commands/`)
for(const file of commandFiles){
const commad = require(`./commands/${file}`);
client.commands.set(commands.name, command);
}
client.on("ready", () => {
console.log("I am ready!");
});
const prefix = (config.prefix);
on_command_error event with if isinstance(error, commands.MissingRequiredArgument):
alright
Also make sure to not silence other errors with an else to print traceback
@hazy sparrow what is commands.name?
"Commands"
in the code you sent, you never defined .name?
This way you're trying to save into the collection the command with the key commands.name, but nowhere does it say what commands.name is.
why are you using a const?
This way you're trying to save into the collection the command with the key commands.name, but nowhere does it say what commands.name is.
@blazing portal ohh i get it
ill fix it and tell if it works
API_ENDPOINT = 'https://discord.com/api/v6'
CLIENT_ID = '332269999912132097'
CLIENT_SECRET = '937it3ow87i4ery69876wqire'
REDIRECT_URI = 'https://nicememe.website'
var exchange_code = function(code){
data = {
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
'grant_type': 'authorization_code',
'code': code,
'redirect_uri': REDIRECT_URI,
'scope': 'identify email connections'
}
headers = {
'Content-Type': 'application/x-www-form-urlencoded'
}
r = requests.post('%s/oauth2/token' % API_ENDPOINT, data=data, headers=headers)
r.raise_for_status()
return r.json()
}
It's ok ?
great ๐
@blazing portal oh nvm mb sorry
Thx :)
There's
As someone already said, you can't just change 1 line to convert from Python to javascript, @tulip zealot
I've change multiple things :)
Yeah but not the requests library
๐ค
const newLocal = client.commands.set(commands.name = Commands, command);
will this do?
Because it doesn't exist in node.js
no @hazy sparrow
Owww
And formatting the string won't work like that in js either I believe
Let's assume you want to load the file test.js. Then your goal is to save it into the commands collection with the key test and the content of... well the the command?
Correct?
And kwargs are set in {key: value} objects, not key=value
yes
this could work:
[...]
// Define the name
const name = file.split('.')[0];
client.commands.set(name, command);
[...]
The file.split gets test from test.js
@restive pebble plz reply
2020-06-30T08:38:08.485176+00:00 heroku[web.1]: Stopping process with SIGKILL
2020-06-30T08:38:08.509421+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2020-06-30T08:38:08.579513+00:00 heroku[web.1]: Process exited with status 22
2020-06-30T08:38:08.642541+00:00 heroku[web.1]: State changed from starting to crashed```
yep. you defined it as commad ๐
const fs = require('fs');
client.commands = new Discord.Collection();
const commandFiles = fs.readdirSync(`./Commands/`)
for(const file of commandFiles){
const commad = require(`./commands/${file}`);
client.commands.set(commands.name, command);
}
client.on("ready", () => {
console.log("I am ready!");
});
const prefix = (config.prefix);
im not sure if youre aware of that but its spelled "commad"
i see
2020-06-30T08:38:08.485176+00:00 heroku[web.1]: Stopping process with SIGKILL
2020-06-30T08:38:08.509421+00:00 app[web.1]: Error waiting for process to terminate: No child processes
2020-06-30T08:38:08.579513+00:00 heroku[web.1]: Process exited with status 22
2020-06-30T08:38:08.642541+00:00 heroku[web.1]: State changed from starting to crashed```
Solution
???
Any buddy reply
Plz
i am saying

u dont have a procfile
Procfile
Procfile
Just a side note, saying "plz help someone" only makes you look impatient, which reduces people's will to help you
go to git hub
And
now its saying "config is not defined"
no create
@hazy sparrow no u
@earnest phoenix ???
what is ur main file?
im not talking to you
Edit file name
@restive pebble last line ya up
inside the Procfile
@restive pebble
create it
code
const Discord = require("discord.js");
const client = new Discord.Client();
const fs = require('fs');
client.commands = new Discord.Collection();
const commandFiles = fs.readdirSync(`./Commands/`)
for(const file of commandFiles){
const command = require(`./commands/${file}`);
const name = file.split('.')[0];
client.commands.set(name, command);
}
client.on("ready", () => {
console.log("I am ready!");
});
const prefix = ("bow");
client.on("message", (message) => {
if (!message.content.startsWith(prefix) || message.author.bot) return;
if (!message.content.startsWith(prefix)) return;
if (command === 'ping') {
client.commands.get('ping').execute(message, args);
the ping command is not responding and nether are all my 7 other commands. any help?
?
ok wait
Where do you define prefix
if (command === 'ping') {
client.commands.get('ping').execute(client, message, args);```
module.exports = {
name: 'ping',
description: "this is a ping command!",
execute(message, args){
message.channel.send('pong!');
}
}
can you type the last line with those discord and client thingy here?
should i put discord in the main code or ping.js
both
okay ill try and let you know
discord.message.channel.send('pong!');
@hazy sparrow Where do you define command?
main code
client.commands = new Discord.Collection();
const commandFiles = fs.readdirSync(`./Commands/`)
for(const file of commandFiles){
const command = require(`./commands/${file}`);
const name = file.split('.')[0];
client.commands.set(name, command);
}
here he does
that works
I use that too
No, I mean if (command === 'ping') {
ahh I see
Where is the command variable defined?
exactly because of that
other command are basic
if(message.content.startsWith(`${prefix}roll`)) {
message.channel.send( ":game_die: | rolled a " + Math.floor(Math.random() * (6- 1 + 1) + 1));
like that
you'd need to show more code
@hazy sparrow make ur const prefix higher
okay
@hazy sparrow you should be seeing an error in your console/terminal
about command not being defined
nope
this error causes the rest of your message event to not proceed
it shows "i am ready!"
thats why none of the commands work
did u copy paste it from lioncodes now video?
https://pastebin.com/f6cPsx2g he left this pastebin in his description
almost exactly ur code
that
the comma there, and the client.login() being inside another )
i replaced it to not show it to you guys
im not talking about the token
oh
there shouldnt be a comma there
and the client.login() should be stand alone
not inside another )
the extra ) should be at the end of the }
a few lines above
done
ok imma stay out of this tim is way better at js and way better at explaining
byeee
lol i didnt mean to take your job
then something in the commands is wrong
show your current code
okay
yes ^
@hazy sparrow
ok lol
i am trying vps for the first time so it might be a noob question. why are sites asking me to buy domain along with actual vps cost ? is buying domain necessary cuz its expensive
@quartz kindle do u know how to add colors when u make a code block in discord? ``````
specify a coding language
@plucky harness if you want an actual website with it, you need one. If it's only for your bot you don't
pinned messages @plucky harness
You don't have to buy a domain, but nobody will use your site if it's only accessible through ip
makes sense
i want only bot but sites still asking for domain name
maybe they think i am trying to build website?
which hosting company?
Are you going to host a public website for your bot?
those are primarily webhosting companies
no
idk if their vps services are good
i see
No website, no domain needed
what do u guys suggest then?
how do people make a bot dashboard?
Using code
look into dedicated vps hoting companies, such as google compute engine, amazon ec2, galaxygate, vultr, ohv, digitalocean, contabo, vpsdime, etc...
What we suggest is highly subjective. I for example use https://contabo.com and i'm very happy
German server provider | #VPS from โฌ3.99 / mo | EU and US Locations available | 15+ years of experience | 70k+ happy customers | #hosting #cloud #infrastructure
4 permonth
thanks
is cheap af
i am gonna look into every1 of those
contabo has the most powerful machines for the same price, by far, but their resources are not dedicated, because they oversell
@restive pebble it says ytdl is not defied
but they're still pretty good from what i've heard
Yeah I've never had issues in the past 2 years there
which plan are you on?
this is fine too I guess
VPS M SSD (8,99โฌ a month), but I'm not only using it for the bot
sounds overkill for 1 bot lmao
can you test something for me? i wanna see their disk speeds
well as i said, not only for the bot^^
ree
ah i misread
sure thing
anyway can you try running this curl -sS https://raw.githubusercontent.com/jgillich/nixbench/master/nixbench.sh | sh
its a linux benchmark
measures cpu, network and disk performance
i wanna compare disk speeds with galaxygate
if(message.content.startsWith(`${prefix}roll`)) {
message.channel.send( ":game_die: | rolled a " + Math.floor(Math.random() * (6- 1 + 1) + 1));``` this seems wrong shouldnt it be } else if(message.content.blablablablbabl code stuff wheee
if(message.content.startsWith(`${prefix}roll`)) { message.channel.send( ":game_die: | rolled a " + Math.floor(Math.random() * (6- 1 + 1) + 1));``` this seems wrong shouldnt it be } else if(message.content.blablablablbabl code stuff wheee
@spare mirage thats what is there
no u have
} else
if
can some1 help me how to skip the guilds who not give permission to the bot
doesesnt it mean the same as far as i know>
It's running. I'll let you know
if(message.content.startsWith(PREFIX + "ping")) {
bot.commands.get('ping').execute(Discord, bot, message, args);
}else if(message.content.startsWith(PREFIX + "image")) {
bot.commands.get('image').execute(Discord, bot, message, args);
This code works for me
can some1 help me how to skip the guilds who not give permission to the bot
dont copy paste it cuz ur my code is
const PREFIX
filter it
and ur is const prefix
ill try change the command === thingy into message.content.startsWith()
@blazing ravine https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter
@hazy sparrow the command is still undefined, so it should be giving you an error about that
whats this
yes that would work @hazy sparrow
also discord.client.commands is wrong
bruh we really need a #development - 2 for more errors
@summer torrent im not using array
@blazing ravine didnt i already tell you how to do it lol
.cache.filter().forEach()
filter is not only for array
what i need type in filter
oo
it logs the message but nothing happens here:
if (StickyMessages.get(`Stick`) == msg.channel.id) {
msg.channel.bulkDelete(2)
let stAcc = await StickyMessages.get(`Stick.${msg.channel.id}`)
msg.channel.send(stAcc)
}
ik im so close, sooooo close...
.filter(guild => guild.me.permissions.has("CREATE_INVITE"))
or something like that
trying to make a sticky message command*
i dont remember the exact permissions, check the docs
stickyMessages is a quick.db table? or what
yup
and did you log stAcc?
message.content.startsWith(`${prefix}ping`) also doesesnt work
@hazy sparrow change the "i am ready" to something else, and see if the change actually works
and did you log stAcc?
@quartz kindle ye wait ill get what it logs
okay
its possible you're not saving the file correctly
thanks
[ { ID: 'Stick', data: { '725823869897932921': 'test' } } ]
tim
!*
and did you remove the if(command ===) part?
yes
show your code again
when i call it to log it through eval:
{ '725823869897932921': 'test' }
@quartz kindle the results from Contabo VPS M SSD:
https://gyazo.com/77bf0cf61813a5c7189730ed47f1c55c
when i call it to log it through eval:
{ '725823869897932921': 'test' }
and when i call the ID, it logs 'test'

@quartz kindle
tfw tim uses the correct spelling of disk in the right context
@blazing ravine yeah i told you to check the docs for the exact permission, since i dont remember
do you know how to check the docs?
Damn, DigitalOcean has 3-4x the disk speed

can you show the results?
Running it right now
Well, I'll take the trade off for the cheaper price. I don't need that much disk speed
it is CREATE_INSTANT_INVITE
https://discord.js.org/#/docs/main/stable/class/Permissions?scrollTo=s-FLAGS
awesome
You collecting these benchmarks somewhere? Would love to be able to easily compare them
In a sharded mongodb cluster for a statistics bot with lots of user data, should i make
a) 1 guild collection, that contains all the data in arrays, including roles,members,channels and big statistics arrays textmessages,voiceminutes,...
b) 1 collection per all of these entities
also note i have to do lots of calculations on the data.
@quartz kindle thanks
@hasty sparrow not really, but since apparently nobody is doing that, i kinda want to
Might actually be a good idea to collect these
can i get link for docs
~20MB faster than DO, NYC 3 is at 372MB/s
shall we make a google sheets?
Sure
@viral spade not sure since i dong use mongo, but theorically one document per guild makes sense
mongo is capable of doing collections inside collections right?
@hasty sparrow @quartz kindle want to dm me your google emails? Then I'd start a sheet with you as collabs
so collection of guild documents, and each guild stores a collection of member documents
Will do
i also think so, because i can shard only this one collection. ont he other hand i fear that my stat update queries might take longer,which then access many different arrays inside the guild collections
bleurgh im back
github importing issue help plz
@blazing portal sure
tim how would i fix?
@earnest phoenix never seen that before, try googleing it
Uhm I don't remember Damian, it's been over 2 years for me. just check their pricing table. It should specify whether there is one
github importing issue help plz
@earnest phoenix apparently github temporarily died
yes i believe contabo has a setup fee from what i heard
tim how do i access just the guild ID from the provided code?
for the 4$ plan atleast
@pure lion it sounds like you're storing the data wrong in the first place, dont you want to access a text directly from .get(...channelid)?
docs
or do you want to save multiple texts per each channel?
yes i do
show how you store them, where you do .set()
wait i should be pushing them right?
oh okay
let messageStc = args.slice(1).join(' ')
let sticc = await msg.channel.send(messageStc)
StickyMessages.set(`Stick.${msg.channel.id}`, `${sticc}`)
thats not a good idea
ah shi-
sticc is the message object that you just sent
you cant store a full message object
youre stringifying it, so it gets converted to something,
discord.client.commands.get is wrong
@quartz kindle none of the commands are responding
but its not reliable to stringifying it generally like that
you want to store the id and the content or only the content?
content
or also attachments and shit
ok ill go change it brb
@hazy sparrow did you remove discord.?
should be just client.commands not discord.client.commands
yea
ok
How to make Random Cat image In python
Lol
Ooof
lol
Anyone?
ยฏ\_(ใ)_/ยฏ
I NEED HELP!
I'm coding my bot and I'm adding a feature where you would type (prefix)wide and it makes an embed where its the authors profile pic but stretched out wider.
How would i go about doing this
I'm coding using glitch
you would probably use an api that provides random cat images
or scrape websites for it
i know python "shuffles" a array when it becomes too big (it forgets where some elements are), but does js the same thing?
@noble dagger more code pls
i legit started coding like 3 days ago
ok
@noble dagger you want to edit the image? you need an image manipulation library, such as gm sharp jimp , etc..
u can use some api
msg.channel.send(JSON.stringify(StickyMessages.get(Stick)))
{"725823869897932921":"please work"}
```through eval
c0nvas
no
im pretty sure glitch is just discord.js but all done online
./
:/
How would a man pronounce href?
@noble dagger its not so
-_-
h-ref
like reference but h
update package.json and add
huhwref
@restive pebble
i pronounce H ref
@pure lion here's how i would do it more or less: ```js
msg = await ....send("whatever");
....set(bla.${msg.channel.id},{id:msg.id,content:msg.content})
msg = ....get(bla.${msg.channel.id})
....send(msg.content)
My bot isn't working
many times i try
internet ossu?
Fuck
map
@restive pebble my connection good
@restive pebble pls answer
uh
Working
@restive pebble i am importing from glitch.com to github.com
u try the previous one
what
That's not working either

Earlier it was saying ytdl core
@earnest phoenix glitch has their own export thing
Is not defined
@pure lion here's how i would do it more or less: ```js
msg = await ....send("whatever");
....set(bla.${msg.channel.id},{id:msg.id,content:msg.content})msg = ....get(
bla.${msg.channel.id})
....send(msg.content)
@quartz kindle ok ty
Vsc?
Oh
@earnest phoenix glitch has their own export thing
@restive pebble no no
i gen. a link from glitch.com import export and copy alink and go to github.com than i past
my english is slow

-> push to github -> then setup heroku
Yeh
export and push same but ok
and upload?
manually
install heroku cli
github heroku same??

i suggest u to read this
oh
@delicate shore dont make api abusive commands, thats a fix
like dm everyone, ban everyone, kick everyone, warn everyone etc.
isnt that the smae as nuking xD
@delicate shore dont make api abusive commands, thats a fix
@restive furnace
What do you mean ?
I mean YouTube API
My bot is a music bot
just use visual studio code and node :/
?
glitch has like 10k projects in 1 vps
so if you buy your own, then theres only ur porjects
But @restive furnace Google API got rate limited
google cloud, azure and aws provides free trials
My rest commands are working
i already told you why.
you can't do anything about that
:+
expect get a vps
Ok
VPS won't do anything
it gets the ratelimit off
Saying
since you only use it
No
i dont think you have like 10k guilds
yes because thats what is glitch
Glitch has nothing to do with that
^
the official youtube api is shit, none of the large bots use it
they all scrape it and use the unofficial api that's made for browsers
and proxy(ies) right?
correct
well
i dont know about proxies
i think not
lavalink is just wrapping a webserver around lavaplayer
yeah they don't do proxying for you
how t oget channel id with command
you cant change channel ids
no i mean
he means how to get them
oh
but what language, lib?
discord.js?
the channel id where the message came from?
but what language, lib?
@restive furnace
ah from a channel mention
message.mentions.channels.first().id
oh thanks u ebst bro ๐ โค๏ธ
tim can u help me now
2020-06-30T12:09:51.534333+00:00 app[worker.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
2020-06-30T12:09:51.534333+00:00 app[worker.1]: at Module.load (internal/modules/cjs/loader.js:566:32)
2020-06-30T12:09:51.534334+00:00 app[worker.1]: at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
2020-06-30T12:09:51.534334+00:00 app[worker.1]: at Function.Module._load (internal/modules/cjs/loader.js:498:3)
2020-06-30T12:09:51.534334+00:00 app[worker.1]: at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
2020-06-30T12:09:51.534334+00:00 app[worker.1]: at startup (internal/bootstrap/node.js:201:19)
2020-06-30T12:09:51.534335+00:00 app[worker.1]: at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
2020-06-30T12:09:51.626934+00:00 heroku[worker.1]: Process exited with status 1
2020-06-30T12:09:51.671546+00:00 heroku[worker.1]: State changed from up to crashed```

wait
tim this good ;d ? let announceChannel = message.mentions.channels.first();
message.guild.channels.find(t => t.id == announceChannel.id).send(myMessage);
@blazing ravine no need to find it
message.mentions.channels.first() gives you the first channel mentioned
including the entire channel structure
you can send directly to it
main code https://pastebin.com/P4FM9ZuF
ping.js https://pastebin.com/B0tXyYza
@quartz kindle
@hazy sparrow do the other commands work now?
nope
not even foo bar?
also, you sent your token
yes
ok good
now the problem with ping is that you're sending it args
but you have no args defined anywhere
you have to create your args
ttim how to get channel id messages came from
oki ty
Hey @restive pebble you here
yes
tim the problem in ping.js or main code
i am facing an issue
in main code
the code u sent me
ok
you do execute(message,args) but args doesnt exist
so i do execute (message) only?
ah
@restive pebble
if you dont need args, you can do message only
i copied exact same code
let messageArray =message.content.split(" ")
ok
but then your command also cant use args
@restive pebble pls see
yes
@restive pebble my issue in heroku plz help bro 

and boeing
what's the error
in that
oooooooook
@quartz kindle string means "" ??
ohk
:hehe xD
no video id found : hehe
oh ๐ฆ
let info = ytdl.songInfo(query)
i can't use that
your yotube api is error
getInfo
let info = ytdl.songInfo(query)
@restive pebble for me?
what is this
ehh learn the programming language first before making a bot.....
i know
ah sorry
buddy
sorry
๐
@delicate shore
ytdl.getInfo
is only valid if i give a valid url
it wont work with query

@delicate shore
yts("oh my god by alec benjamin",function(error,res){
if(err)throw err
let videos = res.videos[0]
let streamUrl=videos.url
})

my problem read
I got a "problem" with my code cuz I make a cmd of a fkick (fake kick) and in the script I make a code that say another think than {username} have been kicked when someone do the cmd on the bot but when I ping the bot with the cmd it's say {username} have been kicked ```java
module.exports = {
name: "fkick",
description: ":)",
execute(message) {
if (!message.mentions.users.size) {
return message.reply('you need to tag a user to kick');
}
const taggedUser = message.mentions.users.first();
if(taggedUser === "@astral#4352") {
message.channel.send('why do you want to kick me TwT')
message.react('๐')
}else{
message.channel.send(`${taggedUser.username} have been kicked`);
message.react('๐')
}
},
};```
its understood that the api key is not sting

string
xd
ah sorry
no
he said fake kick
can someone help me fixx this please
if (message.content == '.config') {
new Discord.Guild(client);
guild.channels.create('name', "text").then(createdChannel => { var id = createdChannel.id })
message.channel.send (id);
}
});
he said fake kick
@finite bough u are a big brain
are u sure the person u are kicking his username is not {username}
xD
@lofty lagoon thats not how it works
lol


