#development
1 messages · Page 1401 of 1
You split the content once and use the params array.
Yes
aha okay got it
any other files you need to see?
I want to make
message.content("hey")
To lower case i tried to do it lower
Case and throw an error
i got this error while installing --global eslint
@glad violet what error?
If you don’t slice your command of the array params[0] will be your command and key index [1] your first argument, [2] your second etc.
hmm yeah
Cannot Find LowerCase of undefined
command not working
jvxzjlhvdgsvjkhds
help me
i did something but it still wouldn't work. I guess i did something wrong
server {
listen 145.239.115.76:443 ssl http2;
listen [::]:443 ssl http2;
server_name www.ale-bot.xyz;
# SSL
ssl_certificate /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
# security
include nginxconfig.io/security.conf;
# reverse proxy
location / {
proxy_pass http://145.239.115.76:8080;
include nginxconfig.io/proxy.conf;
}
# additional config
include nginxconfig.io/general.conf;
}
# non-www, subdomains redirect
server {
listen 145.239.115.76:443 ssl http2;
listen [::]:443 ssl http2;
server_name .ale-bot.xyz;
# SSL
ssl_certificate /etc/letsencrypt/live/ale-bot.xyz/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ale-bot.xyz/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/ale-bot.xyz/chain.pem;
return 301 https://www.ale-bot.xyz$request_uri;
}
# HTTP redirect
server {
listen 145.239.115.76:80;
listen [::]:80;
server_name .ale-bot.xyz;
include nginxconfig.io/letsencrypt.conf;
location / {
return 301 https://www.ale-bot.xyz$request_uri;
}
}```
Yes
help mee 222222222 #development message
@earnest phoenix you dont have permission to do a global install
Check if params[X] exists and if not send a message to the user telling him he forgot to add a parameter
You must install to other folder try to move in desktop
@pure lion but i buy a vps why i dont have perms #development message
@earnest phoenix do you have root access?
@glad violet i have a pannel vps
or sudo
let params = message.content.trim().split(/ +/g);``` i tried accessing ```js
let raids = data.raids.filter(raid => getName(raid.pokemon_id).toLowerCase() === params[0].toLowerCase() && raid.level >= (params[1] ? params[1] : 5))``` well it did nothing \0/
try sudo npm i -g <the package>
@pure lion error /entrypoint.sh: line 11: sudo: command not found
Your first parameter has the key [1]
@earnest phoenix send a screenshot of the full screen
npm i (package)
hmm okay i got the first part
but how would i access the first parameter
i cannot do params[0].1 ofc
@pure lion
params[1]
but i already did right?
hm
Second parameter params[2] etc
Check if the parameter exists, it not the user didn’t put it behind the command
@pure lion hello
alr
Loving myself, too 
lmao
@earnest phoenix why are u trying to install eslint
@earnest phoenix mentioned in discordjs.guide
i assume the host doesn't have a built in code editor
Gonna send the support bill to you 
Don’t forget to check if your parameter may is undefined. If so the user just entered the command without parameters
If so return your function by sending a message to the pleb who forgot to add the parameter
got it!
Alright
also, how do i return ${raid.ex_raid_eligible} (it is always between 0 and 1) as true or false?
(${raid.ex_raid_eligible}>0)
like this?
Is it supposed to be true or false?
if(raid.ex_raid_eligible) true; else false;
if(!raid.ex_raid_eligible) false; else true;
Math.random() < 0.5 will randomly return true or false
what is this?
Boolean(raid.ex_raid_eligible)
@quartz kindle it returns the image i sent above
The statement will be true if your var is true
isnt that what you want? convert 1/0 to true/false?
Huh I thought the opposite
this should be true or false
@boreal iron looks like you making a bot for raid
@earnest phoenix yeah i am
lmao
Can I host node projects on hostgator?
Converting the boolean var to words?
@eternal osprey then do what i said
yeah i already used boolean
the Boolean() function converts anything to true/false
isnt that what you want?
lol
You wanna have a Yes or No?
exactly
then you screwed up your code
but it wipes all the other info
so i was thinking about defining it to a var
and later on calling it
Then check if(raid.ex_raid_eligible) "Yes"; else "No";
Whether Tim doesn’t understand what you want or I or probably we both 
lmao
he said if he uses boolean, then the entire thing gets deleted
so he likely put it in the wrong place
Nah I thought he just wanna output the word yes or no based on the boolean var hr gets
yes thats what he wants
In his embed
Oh I didn’t see that msg
Hmm?
That conversation confuses me ...

yeah i probably placed it wrong
yeah i fxied it
really akwardly placed by me. Sorry
You could try self hosting its just done from inside your code editor example if you made a node.js bot in Visual Studio Code just type "node ." In your console and it runs the bot. Now as long as you have any errors that could occur patched just leave your pc on and your bot will be hosted 24/7
There is no form and you can't get your bot added anymore since discord put a limit to how many bots can be in a server
i put my bot 3 days ago it's on 30%
something's wrong i can feel it

I have an issue understanding why https://nodejs.org/api/process.html#process_process_pid is using 'console.log' inside the process documentation while if you scroll down you see 'process.stdout()' explain
console.log is the standard way of outputting/logging data
but the console.log function itself is a wrapper around std
you can use std streams directly if you want
they are lower level options
Hey, does anyone know how do you deafen the bot in voice channel?
there's a setDeaf method for member.voice
is there something similar for client?
its the same
hey so
im trying to connect to my peer server behind nginx but the server doesnt seem to want to go up
I coded a message logging command and here's my code-
@client.event
async def on_message_delete(message):
if message.guild.id in setlog:
embed = discord.Embed(title = f"Message Deleted!" , colour = discord.Colour.red())
embed.add_field(name = "Author of the message" , value = f"{message.author.name}")
embed.add_field(name = "Content" , value = f"{message.content}")
await ctx.send(embed=embed)
setlog = []
@client.command()
@commands.has_permissions(administrator=True)
async def setlog(ctx , channel = discord.TextChannel):
if ctx.guild.id in setlog:
setlog.pop(setlog.index(ctx.guild.id))
await ctx.channel.send("Sending deleted messages have been disabled")
else:
channel = await client.get_channel
log = snipe_list.append(ctx.guild.id)
await channel.send(log)
await ctx.channel.send("Deleted messages will be shown in that channel!")
Error - discord.ext.commands.errors.BadArgument: Converting to "ABCMeta" failed for parameter "channel".
Can someone help me please 🥺
@quartz kindle @slender thistle 🥺
not = discord.TextChannel, : discord.TextChannel
??
async def setlog(ctx , channel : discord.TextChannel):
Oh I gotchu
it'd also be useful to show what line the error is coming from.
Mhmm
I got an another error
I'll ask it later
First I'll try and I will ask you guys afterwords
Nice
i have a peer server set up at https://www.ale-bot.xyz/peer and i want to connect to it but when i connect from the browser through client side peer, it tries to establish a connection to wss://www.ale-bot.xyz/peer. does anyone know a fix to this?
code?
alright
const myPeer = new Peer(user.id, {
host: "https://ale-bot.xyz",
path: "/peer",
port: 443,
proxied: true
});
hmm, what is the line above it
that
who speak french please ?
je parle francais un petit peu
ok
i
speak english
who can help me for do a dashbord for bot discord please
?
@potent ocean
who can help me for do a dashbord for bot discord please
[14:29]
?
is there anyway to make the bot respond to the user when they dont add an argument so for example !8ball then the bot would respond saying that you need to add some text etc. is that possible on discord.py?
if not will i need to install other software?
@safe creek yes its possible
message.content contains the content of the message
you need to check if it has args or not
How do I filter out NSFW subreddits with PRAW (on discord.py)?
well fuck™️
https://mystb.in/LeeListingCast.python
Does anyone knows why my list doesn't change ?? (python language)
async def on_message_delete(message):
if message.guild.id in setlog:
embed = discord.Embed(title = f"Message Deleted!" , colour = discord.Colour.red())
embed.add_field(name = "**Author of the message**" , value = f"{message.author.name}")
embed.add_field(name = "**Content**" , value = f"{message.content}")
await ctx.send(embed=embed)
setlog = []
@client.command()
@commands.has_permissions(administrator=True)
async def setlog(ctx , channel : discord.TextChannel):
log = setlog.append(ctx.guild.id)
await channel.send(log)
await ctx.channel.send("Deleted messages will be shown in that channel!")```
@leaden lake line?
Error - discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Command' object has no attribute 'append'
@pure lion can you please delete that message and send it now? Others will get confused
what

I don't have any error, but the message got the (modified) thing, and nothing changed, the sent list is always only white
@quartz kindle Bruh help me here
@sick fable whats up
@pure lion error and code above
@leaden lake where is the error from?
Help me what's the meaning of the error and I'll fix it
there is no such thing as Command.append
I don't have error, it just doesn't work. Nothing is changing
@sick fable you have 2 different things with the same name
@quartz kindle Which one?
Hmmmm
so then tim, would there be a way for me to have the server behind a reverse proxy like nginx?
i love me a good array funny
alright
const Discord = require("discord.js");
const Command = require('./command');
const guilds = require('../data/guilds');
module.exports = class extends Command {
name = 'say';
category = 'General';
async execute(client, msg) {
if(!msg.member.hasPermission("KICK_MEMBERS")) {
return msg.channel.send(`**${msg.author.username}**, You do not have enough permission to use this command`);
}
const sayargs = args.join(" ");
msg.delete().catch(O_o=>{});
msg.channel.send(sayargs)
}}
It throws **Cannot read property 'hasPermission' of undefined **
https://mystb.in/DispositionEliminationRemember.python why the grille list doesn't change and is still blank when I react the 1️⃣ ?
@slender wagon Is it from a DM?
wym
msg.member won't exist if the message is not from a server
console.log(msg)
ait
it logs it correctly
Can you show the full output?
@slender wagon if it logs test then no its not correct
you are processing the message content
and passing the arguments as msg
so your msg is not a message, its actually args
im seriously confused at this? what have i done wrong?
@misty sigil fix
let me see hold on
looks like you need to take a step back and go through the basics first before making a discord bot
y- hic yeah tha' buuuuurp that
thank you!! its working now
One message removed from a suspended account.
bot.on("ready" , async() => { some stuff });
ok so like
there is a peer server there
lets ping tim
can we ping tim?
i can ping tim
i am going to ping tim
@quartz kindle
Hello, I have a quick question. I have a command where you can create a moderator section. (Category, Text channel & voice channel.)
However you can execute the command how often you want and it would create the section again and again., I do not want that.
Is there a way if a server owner executes >modlog the second time the whole section and all the channels are deleted?
Which function do I miss in this code?
@commands.command()
async def modlog(self, ctx):
"""Creates a moderator category for you"""
guild = self.bot.get_guild(id=ctx.guild.id)
overwrites = {
guild.default_role: discord.PermissionOverwrite(connect=False, view_channel=False),
guild.me: discord.PermissionOverwrite(manage_channels=True, manage_roles=True,
view_channel=True, connect=True)
}
Category = await guild.create_category(name='Moderator', overwrites=overwrites)
TextChannel = await guild.create_text_channel(name=f'management', category=Category)
VoiceChannel = await guild.create_voice_channel(name=f"Mod-Voice", category=Category)
e = discord.Embed(color=self.bot.color)
e.title = "The Moderator section was successfully created!"
e.description = f"Start off in: {TextChannel.mention}."
await ctx.send(embed=e)
I also tried a await guild.delete_text_channel(discord.TextChannel.name) method but that did not work out
how do I ping a member with message.member?
maybe have a bool which comes from a function that checks if the section already exists
message.member.toString() returns the mentionable string
You may also need to whitelist the member to mention them when sending the message since you can set what mentions you're allowed to send.
assuming you're using Discord.js*
Wrong channel
@sudden geyser so <@>
Are you using Discord.js
So I made a function that sends an embed with a reaction. I want to await the Reactions for the embed so what I did was
const msg = await sendEmbed()
msg.awaitReactions(...)
But I always get the error Cannot read property 'awaitReactions' of undefined.
Is there something special I need to do in the sendEmbed() function?
Make sure you return the sent message object for the sendEmbed() function
I did return message.channel.send(embed) @pale vessel
This command:
@commands.command()
async def taxcalc(self, ctx, amount):
"""Calculates tax on Dank Memer - a useful command for tax calclulations"""
if amount < 20001:
embed = discord.Embed(title="Dank Memer Tax Calculator", description=f"Amount entered: {amount}")
embed.add_field(name=f"Amount expected to pay:", value=f"{amount}")
embed.add_field(name=f"Amount lost by tax:", value=f"0")
embed.add_field(name=f"Tax rate:", value="0%")
await ctx.send(embed=embed)```
Won't send anything, as soon as I do this amount :/
well ok
If you don't know then why even say that?
#development message anyone got any ideas?
Hello, I want to add a reaction to my bot message with that emoji 1️⃣ with discord.js but it cannot find him with that way:
const emoji = message.guild.emojis.cache.find(emoji => emoji.name === "one");
await msg.react(emoji);
Someone can help ? I don't find anything on docs when we want to react with a basic emoji that is not copy-paste inside code
you can just use the emoji like that 1️⃣
That doesn't work, it crash
so msg.react('1️⃣');
It looks fine, it should send as long as you enter an amount under 20001
I got it now
TypeError: Cannot read property 'tag' of null
.setAuthor(channel.sender.tag,channel.sender.avatarURL())
Wait, maybe because i'm in DM it doesn't work
How can I do an array for checking if someone is whitelisted to do a command
should still work @old moss
Yeah but with my find on guild.emoji get a null
are you sure you did ```js
msg.react(':one:');
and not ```js
msg.react(:one:);
Thanks, will try that
or 1️⃣
If you don't know how to use arrays, you should probably learn JS first @solemn leaf
anyone please?
Yup and I got this
["User", "user2"]
Convert amount to integer
hm works for me
ok
@hollow sedge Yeah
Maybe getting my message by that is not the good way
@solid snow Which reactions do you got? I just know on_raw_reaction_add
No one can help you without seeing the code for sendEmbed
makes sense give me a second
@hollow sedge I do know how to make one
function sendEmbed() {
const embed = new Discord.MessageEmbed()
.setTitle('Test')
.addField('\u200B', `Test`)
.setTimestamp()
.setFooter('React with :arrows_counterclockwise: to update this embed, or just run the command again!')
return message.channel.send(embed)
.then(message => {
message.react(':arrows_counterclockwise:');
});
}
const msg = await sendEmbed()
msg.awaitReactions(...)
What happened to Him
his evil clone Tim won
How can I do an array for checking if someone is whitelisted to do a command
When I tried await msg.react(bot.emojis.cache.find(emoji => emoji.name === "one")); I'm getting
what if you do emoji.name === ' 1️⃣ '
do you have a custom emoji named "one"?
Yes xD
at least thats what he said
the emoji cache is only for custom emojis
how can i like show an image in html
yeah use the unicode emoji 1️⃣
but not have other stuff move
@old moss
The unicode emoji is "\:one:" ?
"staff" icon?
@drifting wedge Which of those 2 images isn't doing what it should?
oh wait yeah you need to copy the emoji from a website like https://getemoji.com/
Copy and paste every emoji with 👠no apps required. 😊🥺😉ğŸ˜ğŸ˜˜ğŸ˜šğŸ˜œğŸ˜‚ğŸ˜ğŸ˜³ğŸ˜ğŸ˜£ğŸ˜¢ğŸ˜ğŸ˜°ğŸ¥°
that wont work
well it worked for me at least :/
it wont
because the emoji cache is only for custom emojis
there are no standard emojis in the emoji cache
the image one
the like unrendered one
oh wait hes using the cache?
and what's the issue?
yes hes trying to get it from the cache
tell me again please
its being moved offcenter
Thank you a lot
Yep it work now
cool!
How can I have like an array or json that has ids of people
Of a guild ?
what?
@drifting wedge Ok back to you... it's not supposed to be in the middle?
Is graceful-fs a good replacement for fs
its fine
i moved it up to the top
ty tho
lmao alright
How can I do soemthing like this
if (message.author.id !== whitelist.users) {
return;
}
is whitelist.users an array?
Yeah
yeah you want to know if the array includes the item 😄
god I wish we could create google search results as links in messages
.includes?
okay I think I can do from here but can I comment in json?
it says whitelist.users is undefined
hmm? what did you do? post the line
if (!whitelist.users.includes(message.author.id)) {}
{
"users": [
"485987127809671168",
"150647394344632320",
"292946620759146496"
]
}
hmm and obj is called whitelist?
Is that inside a json file or a js file?
look into search engine optimization
no like it literally doesnt show up
That takes a while, days, weeks or longer
google dorking always try it
didnt know
How to make my code to lower case
@boreal iron
I'm here
what language are you using
and are you referring to a string
string.toLowerCase()
Ok
@boreal iron help still on this?#development message
how did you load the json file?
exports
Pydroid.3
Python
Watever...
Can some 1 pls dm me the code for a 8ball command but... With random hentai gifs??:
const whitelist = require("./whitelist.json")
Ive been up the last 1 or 2 days xdd
Truing to figure it out
@solemn leaf
Happy 811 days on discord!!
XSS
XDD**
what does the log output for whitelist?
I have, 2 discord versions. 1 from happy mod so i can SEe hownold ppls accs are.
Holyy
@boreal iron 1480 DAYS XDD
@lost berry
Pydroid.3
Python
Watever...
Can some 1 pls dm me the code for a 8ball command but... With random hentai gifs??
Ive been up the last 1 or 2 days xdd
Trying to figure it out
Pydroid.3
Python
Watever...
Can some 1 pls dm me the code for a 8ball command but... With random hentai gifs??
Ive been up the last 1 or 2 days xdd
Trying to figure it out
use the random module's choice function.
that's the most logic you need out of it.
That's disgusting..but ok
Make sure to lock it to nsfw channels
I assign Math.random and Math.floor to a variable and then through that variable I get the pic named with that number xD
keep in mind this is python
In JavaScript yeah you have to do that
in Python its ```py
import random
random.choice(seq)```
quick question, how do i remove value from an array?
i tried .pop[0] it doesnt work
oh, right, didn't notice
.pop() is a method and removes the last element in the array. If you want to remove an element from the front, use .shift() instead. If you want to remove it from an index, use .splice
.shift removes all elements but 1st one
If you know the key of the item slice the item
It removes elements starting at the front
That's completely wrong assuming you wanna get the args behind the command
is there a better way to format the ping command? the one i keep using is ok but id like to upgrade it to show how long it took to ping to discord
i just wanna remove the 1st element
i use this
client.on("message", msg => {
if(msg.content === `${prefix}ping`) {
msg.delete({timeout:10});
msg.channel.send({embed: {
color: 46679,
title: "Latency Ping:",
fields: [
{ name: "Results", value:new Date().getTime() - msg.createdTimestamp + "ms", inline: true}
]
}
})
}
});```
than build the new array starting at key 1 ...slice(1);
hey guys is there an event i can use when someone votes for my bot on top.gg? like to get the users voted and then give them rewards etc
is there an event like client.on("message")?
i think thats #topgg-api quesiton
If it requires to be live you will have to setup a webhook service (or related) and use DBLs option to send a webhook to you
i see
also do i need to be in more than 75 servers to put the bot on top.gg? i saw some vids and they said after 75servers is when you'll be able to verify your bot
It requires to know how webhooks work and how you can set up a webhook service, anything else does the DBL lib for you if you wanna use it
sure i'll look into that
was just wondering if discordjs lib itself has something similar
nope you can add your bot at any time
got it thanks
nope djs in fact has nothing to do with DBL
music bot js stop command not working
case 'stop':
var server = servers[message.guild.id];
if(message.guild.voiceConnection){
for(var i = server.queue.length -1; i >=0; i--){
server.queue.splice(i, 1);
}
server.dispatcher.end();
message.channel.send("Leaving...")
console.log('Leaved Succes')
}
if(message.guild.connection) message.guild.voiceConnection.disconnect();
break;
if u find the problem ping me
It's your code. You tell us what's not working about it.
For example, if you look in the documentation, you'll see .guild.voiceConnection is not a thing.
But you'll see .guild.voice.connection is.
its says cannot read end of undefined
server.dispatcher.end();
all commands is outdated 😦
why discord delete old commands
on a scale of 1 to 10, how well would you say you're fluent in javascript
commands outdated?
yea
use new one then :d
it is
server.dispatcher is something you created, not a library thing
server is an object you created
you assigned the dispatcher to it
its your reponsibility
how is server related to discordjs?
also quick question do i need to add DSL to my server?
you must be using command handler thing
before adding my bot
@crystal wigeon no
or is that field optional
only if u add servers
will all my files in VSC be ran when i run the mail python file that has my bots token in?
mail python file?
yes so if i run my main file so that m bot goes online will all my other files run too?
so my eco, moderation, fun etc also run
only if they are imported
my laptop is from france but on english setiings lmao
hello do you have turkish
How can I make the bot find the user with the name? I make this: js client.users.cache.find(user => user.name === args.join(" "))
?
user.username returns the user's username.
You'll also need intents enabled to cache users to a reasonable amount for indexing.
oh
lol
aj!botguilds
...
i make this
wrong channel @earnest phoenix
sorry
Multi Extends code:
https://hasteb.in/hofonupe.js
Client class code:
https://hasteb.in/arilecin.coffeescript
Why is this.on not a function?? I presume the multi extends is doing something wrong and not binding functions??
what is the problem?
ima assume the single ' after name and boosters
That's the issue right now, I don't have a working pc
Error:
(node:22404) UnhandledPromiseRejectionWarning: Error: 400 Bad Request
Code:
const { MessageEmbed } = require('discord.js');
const request = require('node-superfetch');
module.exports = {
name: 'google',
category: 'Fun',
description: 'Search something on Google',
usage: 'f!google <query>',
run: async (client, message, args) => {
let googleKey = 'XXXX'
let csx = " XXXX"
let query = args.join(" ");
if(!query) return message.channel.send("Unknow Search.");
let href = await search(query);
if(!href) return message.channel.send("Unknow Search.");
let embed = new MessageEmbed()
.setColor('BLURPLE')
.setAuthor(`First Result for ${query}`)
.setTitle(href.title)
.setDescription(href.snippet)
.setTimestamp()
.setImage(href.pagemap ? href.pagemap.cse_thumbnail[0].src : null)
.setFooter("Powered by Google", "https://upload.wikimedia.org/wikipedia/commons/thumb/5/53/Google_%22G%22_Logo.svg/512px-Google_%22G%22_Logo.png");
return message.channel.send(embed);
async function search(query) {
const { body } = await request.get("https://www.googleapis.com/customsearch/v1").query({
key: googleKey, cx: csx, safe: "off", q: query
});
if(!body.items) return null;
return body.items[0];
}
}
}
Where is the peroblem?
@stark abyss hey need help
can someone check my script?
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/lorenzo/Desktop/Modbot-2.0/index.js:3:1)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/Users/lorenzo/Desktop/Modbot-2.0/index.js' ]
}```
¯_(ツ)_/¯
im not good at this
what happens when you get discord api banned
like do u have to make a whole new bot
yeah, i was hoping someone that did know would answer
hi my javascirpt code i need help dm if i can help
wait an hour
and then dont abuse the api?
oh, alright, thanks
hi
@grizzled plinth @azure spire #general-int
can someone help me with my script i keep getting this error code
Require stack:
- /Users/lorenzo/Desktop/Modbot-2.0/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
at Function.Module._load (internal/modules/cjs/loader.js:725:27)
at Module.require (internal/modules/cjs/loader.js:952:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/Users/lorenzo/Desktop/Modbot-2.0/index.js:3:1)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/Users/lorenzo/Desktop/Modbot-2.0/index.js' ]```
if you broadcastEval, will the shard that called jt also do that eval?
idk
then why answer 
¯_(ツ)_/¯
Wait- before I start this joke, To claim a nitro gift do you need to be in that server?
No
I doubt they would be able to claim it faster than someone who is in the channel
I guess.
What is happened?
how can i get the weather
the weather boost
it should be in the link i sent
but i cannot access it for example
does anybody know how that variable is called based on that link
okay so if you broadcastEval, will the shard that called it also do that eval
yes
how do i make the bots page custom
Css and html
A few examples here https://custom.discord.re
Use inspect element, that's the thing i suggest you to do
@cerulean ingot
@rustic nova i tried css #menu { position: absolute; top: 0; left: 0; right: 0; margin: auto; z-index: 999; background: rgb(254 174 53); }
and it didnt work
hmm
Use inspect element
What are you trying to change?
the nav bar color
If you change it in inspect, it doesn't save.
You have to add the css in your long description
No
no, <style> css code ... </style>
<style>
#menu {
position: absolute;
top: 0;
left: 0;
right: 0;
margin: auto;
z-index: 999;
background: rgb(254 174 53);
}
</style>
this is css btw
yeah, didn't see what he was referring to, sorry
Code?
server.dispatcher.end();
Full code
i used
var server = servers[message.guild.id]
dispatcher exists
this is end command
play command have dispatcher and works
bro something wrong with end
not with other commands
the error literally says that dispatcher doesnt exist
DISPATCHER EXISTS
i have this command adobe
server.dispatcher = connection.play(ytdl(server.queue[0], {filter: "audioonly"}));
and works great
end have problem
when i type &stop bot crashes and says this error
Stop command code
case 'stop':
var server = servers[message.guild.id];
if(message.guild.voice.connection){
for(var i = server.queue.length -1; i >=0; i--){
server.queue.splice(i, 1);
}
server.dispatcher.end();
message.channel.send("Leaving...")
console.log('Leaved Succes')
}
if(message.guild.connection) message.guild.voice.connection.disconnect();
break;
already told you the problem is not there
do console.log(server.dispatcher)
and you'll see
where it is
somewhere in your code you deleted server.dispatcher
ok
hello, the standart is bot = discord.Client() right?
i will send my code token hiden
tim fix this code
its not my job to fix your code
try to do it
if(message.author.id(715466982123765822"))
idk why
hey can anyone fix this error
server.dispatcher.end()
cannot read properly end of undefined
yes
{
users: [ '485987127809671168', '150647394344632320', '292946620759146496' ]
}
it printed that
lol
try to add const evaled = eval(command)
First
you're just making it worse lol
.................
Did you log it inside your command function?
index
@glad violet do the same thing you did in your skip command
only end if dispatcher exists
ok
Maybe Tim has an idea @solemn leaf
ok
skip and stop code
case 'skip':
var server = servers[message.guild.id];
if(server.dispatcher) server.dispatcher.end();
message.channel.send("Skipped!")
break;
case 'stop':
var server = servers[message.guild.id];
if(message.guild.voice.connection){
for(var i = server.queue.length -1; i >=0; i--){
server.queue.splice(i, 1);
}
server.dispatcher.end();
message.channel.send("Leaving...")
console.log('Leaved Succes')
}
if(message.guild.connection) message.guild.voice.connection.disconnect();
break;
Ah okay sorry didn’t remember it’s in there
Yeah
@solemn leaf check your run function
It printed embedconf
so whitelist isnt the whitelist json
this is what is sending it
if (commandfile) commandfile.run(bot, message, args, embedconf, whitelist);
Can’t take a look atm sry, driving rn
that's not secure
the place where you use the function
you're evaluating before checking.
technicaly it is secure since hes evaling a fixed string lmao
your variables are wrong
Found your issue
you are evaling command
You’re using 5 parameters instead of 4
does it have to be the right size?
@earnest phoenix if command is "eval" then if you eval(command) of course the result will be "eval"
Take a look at the message I responded to
I fought I could cut the thigns I didnt need like bot and stuff
module.exports.run = async (bot, message, args, embedconf, whitelist) => {
@solemn leaf arguments are passed by order, not by name
rip i tried to do toLowerCase and i got error while typing Hi
Idk
Additionally their name atm you call your function doesn’t need to match the ones you’ve defined in your function
@solemn leaf
?
Try if(message.content.toLowerCase() === "hi") {
there is a space but it doesnt count it as another arg
ok
if you do toLowerCase() then it will never equal Hi because Hi has an uppercase
oop
function test(p1, p2, p3)
{
p1...p2...p3...
}
Calling the function doesn’t require to use the argument names p1, p2 etc.
test(x, x, z)
Not so easy to explain while trying not to hit a tree lmao
The args you passed x,y,z are not available inside your function as in my example
But p1, p2, p3 are
again error
bye going to sleep
If you call your function using less args for example, test(x,y)
will result in p3 is undefined
To complete the example and show you your issue
no
How could I do like -announce #channel -T:Heyy -F:Heloo
t for title and f for feild
I would split by whitespaces at first and secondly split the items of the array by :
If this second array first item (key 0) is -T then check if the key 1 exists and boom you got your title
split by whitespaces first
whitespaces?
Or regex / +/g
Then loop your array and split the items by :
If : wasn’t found as string in your item use continue; in your loop
so let content = message.content.split(" ").slice(1);
Yeah to remove your command that makes sense
After loop content, search each element if a : was found inside its string
If so element.split(":")
idk how to do or which would be best
And you need to got through each element of it
for(let idx = 0; idx < content.length; idx++)
for (let idx = 0; idx < content.length; idx++) {
}
Correct
let content = message.content.split(" ").slice(1);
for (let idx = 0; idx < content.length; idx++) {
content.split(":")
}
if(!content[idx].includes(":")) continue;
First line in your loop
You can (again) split by : now
again?
for (let idx = 0; idx < content.length; idx++) {
if(!content[idx].includes(":")) continue;
content.split(":")
}
so wait
If you search tor the string you will have to remove -T: of course
quick question whats the difference between an cog and a var?
Leaving highway now, that should be a good base
Ew would also work
Just remind me tomorrow
if (content.split("title:"))?
Will help you then
ok
How can I get the State of a checkbox in html using flask? Ping me with responses
You can only get a list of the ones that are checked @drifting wedge
And their names
if i got bot.on('messageReactionAdd', async (reaction, user) => {} how would I get the message guild id?
that would just throw that it couldnt find the id but i figured out how
@drifting wedge
yep
tnx
gimme 1 sec
yes ofc
tnx dude
and youre set
audio / mic quality is shit
but you can look at code
to understand
ping me if u need any more help
I can help too ya know
nah frick dice
I have a lot of general coding knowledge
YAS
exe is very more pog
Python ?
I'm trying to be helpful lad
im the "snake charmer"
Yes py
its a joke
I'm the everything charmer
r/dice_isnt_pog
ok tnx guys
Almost 7-8 langs 
i really apreciate it !
how do i get the user that voted on on_dbl_vote
Muy pog
really @pure lion
Np
list them
dice is nice
••• **FakE **is typing...
Yeah i saw that 😂
A book of text is coming....any second now...
Novel time
let content = message.content.trim().split(" ").slice(1);
let title = null, announcement = null;
for(let i = 0; i < content.length; i++)
{
if(!content[i].includes(":")) continue;
let item = content[i].split(":");
if(item[1] === undefined || item[2]) continue;
let param = item[0].toLowerCase();
if(param == "t") title = item[1];
else if(param == "a") announcement = item[1];
}
if(title === null) return message.reply("no title given");
if(announcement === null) return message.reply("no announcement given");
Embed()
.setTitle(title)
.setDescription(announcement)
....
@solemn leaf
Possible typos... still driving
That should explain how to do it
you wrote that..while driving?
Aye
pro
Aye
the only typo i see is lenth instead of length
It’s not how I would code it but it should be understandable code
what's the difference between Java and JavaScript?
Oh
i dont think they're similar at all
i just want to know what's the difference 🤔
javascript is for stuff like websites
Fixed ty
java is like C#
oh
they really have nothing to do with each other
Java is a compiled, Object Oriented, type safe language meant for the back end while JavaScript is a scripting language which can be used in both web dev and server development. JavaScript is also Object oriented but is not type safe. JavaScript is also interpreted instead of compiled
they're both painful to write does that count /s
It was all within six months from May till December (1995) that it was Mocha and then LiveScript. And then in early December, Netscape and Sun did a license agreement and it became JavaScript. And the idea was to make it a complementary scripting language to go with Java, with the compiled language.
as cry so eloquently said, java and javascript are like car and carpet
is this java?



