#development
1 messages · Page 1338 of 1
did you capitalise it maybe? or did u define bot
check on the top for const client
can you show?
const client = new Discord.Client();
const prefix = ';';
const fs = require('fs');
client.commands = new Discord.Collection();
const commandFiles = fs.readdirSync('./commands/').filter(file => file.endsWith('.js'));
for(const file of commandFiles){
const command = require(`./commands/${file}`);
client.commands.set(command.name, command);
}
ping.js
different file
yes
yeah
you need to pass a client to the function
or define it again
and name it properly inside it
but functions better
@dense spruce #development message
that's my unwarn.js
const { Guild } = require('discord.js')
const moment = require('moment')
Discord = require('discord.js')
moment.locale('fr')
module.exports = {
run: async (message, args, client) => {
if (!message.member.hasPermission('MANAGE_MESSAGES')) return message.channel.send('Vous n\'avez pas la puissance de unwarn un membre (trop faible)')
const member = message.mentions.members.first()
if (!member) return message.channel.send('Impossible de unwarn du vide (trop bête)')
if (!client.db.warns[member.id]) return message.channel.send(new Discord.MessageEmbed()
.setDescription(`**${member.user.tag}** est clean (bien joué champion)`)
.setColor('#0082ff'))
const warnIndex = parseInt(args[1], 10) - 1
if (warnIndex < 0 || !client.db.warns[member.id][warnIndex]) return message.channel.send('Ce warn n\'est pas dans ma banque de données (oups)')
if (message.guild.id !== `${client.db.guildid}`) return message.channel.send(`Ce warn n\'a pas été donné sur ce serveur (triche pas)`)
const { reason } = client.db.warns[member.id].splice(warnIndex, 1)[0]
if (!client.db.warns[member.id].length) delete client.db.warns[member.id]
fs.writeFileSync('./db.json', JSON.stringify(client.db))
message.channel.send(new Discord.MessageEmbed()
.setDescription(`**${member.user.tag}** a été unwarn. Raison : ${reason}`)
.setColor('#0082ff'))
},
name: 'unwarn',
guildOnly: true
}```
and this is my db.json :
```{"warns":{"659057892640555029":[{"reason":"test","date":1603269338321,"mod":"635914452734312449","guildid":"639799184643325981","guildname":"DraquoDrass"},{"reason":"testt","date":1603211089299,"mod":"635914452734312449","guildid":"639799184643325981","guildname":"DraquoDrass"}]},"tickets":{},"cakepoint":{}}```
name: 'ping',
description: "This is a ping command!",
execute(message, args){
message.channel.send(`Pong 🏓 Latency is ${Date.now() - message.createdTimestamp}ms. API Latency is ${Math.round(client.ws.ping)}ms`);
}
}```
mongo is not good for beginners
@earnest phoenix wot
Ugh
Help me too please
Hey. I need to crate channel and set premissions overwrites.
var overwrites = new ds.Collection;
var memberPremissions = new ds.Permissions;
var memberOverwrites = new ds.PermissionOverwrites;
var everyoneOverwrites = new ds.PermissionOverwrites;
memberPremissions.add("READ_MESSAGE_HISTORY");
memberPremissions.add("VIEW_CHANNEL");
memberPremissions.add("SEND_MESSAGES");
memberOverwrites.allow = memberPremissions;
everyoneOverwrites.deny = memberPremissions;
overwrites.set(msg.guild.roles.everyone.id , everyoneOverwrites);
overwrites.set(clanData.memberRole.id , memberOverwrites);
console.log(overwrites);
msg.guild.channels.create(clanData.name, {type:'category', reason:'new guild', permissionOverwrites:overwrites});
sooo, there are error:
node:11828) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
permission_overwrites[0].id: This field is required
permission_overwrites[1].id: This field is required
at RequestHandler.execute (D:\Projects\Maid\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:11828) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:11828) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
or define it again
@abstract coyote if you define it again it will be a different instance of the same bot
@hybrid roost read the error please
it's literally explaining you why the error occured AND how to fix it
ofcores
I am already read it
permission_overwrites[0].id: This field is required
permission_overwrites[1].id: This field is required
I know
have you defined clanData.name??????
but where
have you defined
clanData.name??????
@carmine summit yep
@carmine summit yep
@hybrid roost Show me
var clanData = {
name: args[0],
owner: funcs.getID(args[0]),
ownerRole: await msg.guild.roles.create({data:{name:args[0] + "'s leader", position:0}, reason:'new clan'}),
memberRole: await msg.guild.roles.create({data:{name:args[0] + "", position:0}, reason:'new clan'}),
rating : 0
}
So, i got a big string with a couple constraints and this format
Name: <name>
Email: <email>
Subject: <text>
Message: <message>
Any cheesy and smart way to split that?
The fields can be multi line, so i cant split on \n alone.
thought of some loops with startsWith() 4 times and split('\n') with breaks and replaces but there has to be some better and more optimal way of processing that.
Anyone got any ideas?
https://cdn.discordapp.com/attachments/272764566411149314/768348857209323530/unknown.png
unfortunately due to the nature of the API, i only have access to the string and not the fields themselves before they are merged into a single output 
Think regex might work?
i was thinking about that too
match, clone it and then replace the original string match with empty string
but that also sounds like an unoptimized way[
and can fail if someone types in the wrong keyword at the wrong time
@hybrid roost Can you console overwrites
I am already show it. And i understood my mistake
memberOverwrites.id = clanData.memberRole.id;
everyoneOverwrites.id = msg.guild.roles.everyone.id;
I've got to set role's ID in PremissionsOverwrites
@opal plank Does the sender need to manually write Name:, Email: etc into the message?
no
those are the fields inputted
what comes AFTER them, yes, is inputted by the user
but that format should always be the same
You said you wanna explode those 4 lines
i need to parse them
str.split('\n')???
Hmm okay and what would you expect to fail (by the input side)?
Using an email which isn’t a real one etc?
Oh didn’t see that
i need to extract the field inputs and parse them
i was thinking of split(\n) => for(let a in array) {
switch(a.startsWith()) {
case: name { doo thing// }
}
}
or perhaps a break for loop
str.replace(/\\n\\n/g, '\n')
??????
regex seems like an option too, this isnt used as frequently where i would sweat with a non-greedy regex
@carmine summit are you trying to help me?
yes?
the heck am i suppose to do with that?
Even then regex would take much longer since it checks each possibility
replacing 2 consecutive newlines with a newline?
what?
yeah, thats why i was thinking about a for loop
which one of those can be multiline? just the message?
I thought what you mean by multiline is multiple newlines
or literally any field?
technically all of them
while i doubt some dumb fuck would do that, i must not underestimate human stupidity
I hear regex 
lmao
Mm I do love my name entered as
Assanali
Mukhanov
what is your name?
User:I am GhlUkish, the destroyer of worlds, the one who brings the ragnarok within the fortnight, he, whom with great power, will bring perish in the world
I guess what ur tried to do Erwin, but if the case wasn’t found in ur switch element it would mean to be a new line
If so you would need to add the case to the previous field
well yeah, my idea was to add add the line to a temporary string each iteration
so i'd be adding them until i find the next line, which then i'd remove them
Does it need to be a string?
wdym?
Probably adding it an array and increasing the array key only if the case is not default
Would add a default case aka new line to the previous field
And at the end use the array to create the string
https://cdn.discordapp.com/attachments/272764566411149314/768348857209323530/unknown.png
output object:
{
name: "Erwin",
email: "email",
subject: "testing webwook",
message: "Dan is a cuck"
}```@fluid basin
Let me get to the PC real quick
the problem is multi lined fields
Gonna write an example
though there could be false positives
thats why i was thinking of using startsWith()
split on newlines
even if someone has the word Message: in their fields, it'll be harder to pass as false positive in the beggining of a new line
but realistically name, email and subject shouldn't be multiline
while i doubt some dumb fuck would do that, i must not underestimate human stupidity
name = str[0].replace('Name: ', '')
email= str[1].replace('Email: ', '')
subject = str[2].replace('Subject: ', '')
message = str[3].replace('Message: ', '')```No regex
ok bye
i feel dumb
ah, yes, i see you took into account the multiline i said
hello
Bot awaiting approval - Please be patient, we humans take time to verify bots!
??
wait 8+ weeks
when is it approved
@opal plank Is it efficient?
too much
multiline fields
uh
Once again the user doesn’t input Name:, Email: string etc? Just “answers”
yes, just answers @boreal iron
Ok writing...
@carmine summit false positives
false postitives????
i got working code but its super long
paste
:<
switch with startsWith
on default: append string to temporary string(account for multiline)
once it finds a match it pushes the temp string content onto the object and replace the original
Name: some
name here
Email: some other email@here
but some idiot put another alt email here
Subject: How to do stuff like this
but there are too many newlines or a big ass text
Message: Well, this is
the easy part
Take that as input, and turn it into and object with the following format: ```js
{
name: '',
email: '',
subject: '',
message:''
}
Thats the goal
ok don't nail me down on it but the direction should be a good one I guess
let result = { name: '', email: '', subject: '', message: '' };
let last_case;
split('\n') => for(let input in array)
{
switch(input.startsWith())
{
case: 'name:'
result.name = input;
last_case = 'name';
break;
case: 'email:'
result.email = input;
last_case = 'email';
break;
case: 'subject:'
result.subject = input;
last_case = 'subject';
break;
case: 'message:'
result.message = input;
last_case = 'message';
break;
default:
result.last_case = result.last_case + input;
break;
}
}```
@opal plank
Is there a way to end a collector? Like collector.end?
collector.stop
@boreal iron False positives?
@boreal iron wouldnt last_case be fucked for every other field with newlines?
but yeah, you going on the same direction i was
New lines would not hit "case" in your switch, so they would hit the "default"
And they would be added to the last case
yes, but they all would be merged
Doesn't matter how much new lines there are
result.last_case = result.last_case + input; not sure if that's the correct method anyway
huh why not?
yeah try it, I can't atm
still didn't understand, if the user is anwsering the questions, how do u trigger if he has to answer the next question?
myMap = new Map()
for (elem = 0; elem < l.length; elem++) {
let fieldName = l[elem].split(": ")[0];
if (["Name", "Email", "Subject", "Message"].includes(fieldName))
myMap.set(fieldName, l[elem]);
Map(5) { Name → "Name: Eee Aaa", Email → "Email: yolo@gay.at", Subject → "Subject: I'm alive", Message → "Message: You are", undefined → "undefined\nalready dead." }
- question: name
- question: email
How do you trigger if the client entered a name and wanna add another line, he still responses to the 1. question?
got a bit
any npm that you can add a image in a image to make image generations
canvas/canvacord
Think we have different understandings what he started with, lol, Shiv
@boreal iron thats all returning from a form in HTML from a different API
okay, okay understood
if so, my solution is not sweet but should work
U should problably check for result.message.length == max length
Not to abuse the system as spam
if needed
yeah i'll do that after i parse it though
aye, after the switch
oh yeah, then it's a good thing to check it
Hey Erwin
sup
for (elem = 0; elem < l.length; elem++)
{
let field = l[elem].split(": ");
if (["Name", "Email", "Subject", "Message"].includes(field[0]))
{
myMap.set(field[0], field.slice(1).join(" "));
var fieldName = field[0];
}
else
myMap.set(myMap.get(fieldName), myMap.get(fieldName) + "\n" + l[elem])
}
Map(5) { Name → "Eee Aaa", Email → "yolo@gay.at", Subject → "I'm alive", Message → "You are", "You are" → "You are\nalready dead." }
``` jackshit but may give you an idea
Just another idea I could give u is to use PHP to process ur HTML form, check and validate each value and send it to ur API after
since PHP is server-sided only, it can not be manipulated, like a maxlength="" tag in HTML field inputs for example
its not my api nor my website though
thats the issue
i need to work with the output, thats about it
i'll give that a try too @slender thistle
gonna get something to eat real quick, brb
how can i make that function async
u may wanna report back if it works out or not
aight
why the fuck is last fieldName Message
but I'm getting a You are key
referring to
myMap = new Map()
for (elem = 0; elem < l.length; elem++)
{
let field = l[elem].split(": ");
if (["Name", "Email", "Subject", "Message"].includes(field[0]))
{
myMap.set(field[0], field.slice(1).join(" "));
var fieldName = field[0];
}
else
myMap.set(myMap.get(fieldName), myMap.get(fieldName) + "\n" + l[elem])
}
console.log(fieldName);
console.log(myMap)
why the fuck is last fieldName
Message
@slender thistle it is not?
js outputs Message as the last value
I think because splitting a not found string gives the original string back
yeah last field name should be message
how can i make that function async
@gentle lynxgetDefense: async ID => {
ty
i got it
startsWith() switch() and a temp string
and some replaces sprinkled
ty @boreal iron @slender thistle @fluid basin
i see Name somehow got fucked

Well good it’s solved
const keys = ['Name:', 'Email:', 'Subject:', 'Message:'];
const out = str.split('\n').reduce((v , s) => { s.startsWith(keys[v.i + 1]) ? v.f[keys[++v.i]] = s.replace(keys[v.i], '') : v.f[keys(v.i)] += `\n${s}`; return v}, {f: {}, i: -1})```
Yeah I actually forgot to add \n behind the last_case +
wait this code might not work
How to know if messages are more than 14 days behind?
@opal plank mind trying my one uhem wait its two liner code?
@earnest phoenix messages should have a timestamp/created at property depending on your library so you can tell
Ok so message.createdAt and message.createdTimestamp are the properties you want
@fluid basin i got it working already with multiline
but... but its shorter
and I thought you wanted a shorter one >.>
i'll give it a try in a bit
since format is the same, i'll change it afterwards
i wanna get a prototype going soon
Ok so
message.createdAtandmessage.createdTimestampare the properties you want
okok
let dateMasseges = message.createdAt - message.createdTimestamp > 14```
uh... no you don't use both, you use one of them depending on what you need to do
they're both the same value, just different formats
ohh
ok
let dateMasseges = message.createdAt - message.createdTimestamp > 14```
this?
Bruh.
they're both the same value, just different formats
same but different, just like people
Nice example.d
What do wanna compare to each other? Message created time - current timestamp?
It would be current timestamp - message created time anyways, to be correct
same but different, just like people
@opal plank
Name: yolo
I'm gay
Name: hi this is fake name
👀
hey, don't abuse my name
setInterval(function(){
let statuses = [
`with tr!help | ${client.guilds.cache.size} Guilds `,
`with tr!help | ${client.users.cache.size} Users`,
"with tr!help or Mention Me"
]
let status = statuses[Math.floor(Math.random() * statuses.length)];
client.user.setPresence({
activity: { name: status, type: "PLAYING" },
status: "dnd"
});
}, 180000)
{
let vc = db.get(`vcchannel_${member.guild.id}`);{
if (!vc) return;
channels.join(vc);
}
console.log(client.commands.size)
console.log('I m ready to Go | Thunder is OP')
}
})```
@slender thistle lul
thats why you should sanitise user input
Date.now() - message.createdAt so, that's true? @boreal iron
ready doesnt emit guild @next flax
huh idk djs, dunno if it's a string or timestamp
:/
Date
oh lol he answered it already
ready doesnt emit guild @next flax
@opal plank is their anything i can do then?
isn't that same thing
@next flax dont use guild, guild doesnt exist there
assuming it is a timestamp as the name message.createdTimestamp says, not a string
so what? 
are you using qwerty keyboard 
you arent really supposedly to manipulate snowflakes directly
which i do lmao
unless you really know what you're doing
yeah but but
conversion isnt manipulation btw
well, yeah
though that requires manipulation
snowflake => creation timestamp has some annoying math involved
nah just shifting bits
client.channels.get(vc).join();
However (Date.now() - message.createdTimestamp) > xyz should be the right one u can go with @earnest phoenix
yeah i know
its not just shifting bits though
yeah
learning-csharp.might-be-super.fun
I'm dead

i absolutely hate Ts for this one
watch this
explain pls?
lower than es2020, is using esnext


I need ideas for a utility bot
it IS 2020
yeah the specs are out
I need ideas for a utility bot
@surreal sage make it utilizable
what
is their a way by which bot will auto join voice channels when restarted
yes
yea
on 'ready' => client.channels.get(id).join()
client.channels.cache.get(vc).join();
@next flax ?
thats about it
yuh
but then
Yuh?
how will quick.db fetch those channels
u may wanna save the last vc the bot was in, if he has been moved into a different one for example (is that even possible in Discord) idk
short TeamSpeak flashback
does anyone know how to
Create a program in python that asks for the length and width of 2 rectangles then display the areas of the rectangles and stating which is larger.
u may wanna save the last vc the bot was in, if he has been moved into a different one for example (is that even possible in Discord) idk
@boreal iron no
math @long yew
alright, then it's not needed :D
setInterval(function(){ let statuses = [ `with tr!help | ${client.guilds.cache.size} Guilds `, `with tr!help | ${client.users.cache.size} Users`, "with tr!help or Mention Me" ] let status = statuses[Math.floor(Math.random() * statuses.length)]; client.user.setPresence({ activity: { name: status, type: "PLAYING" }, status: "dnd" }); }, 180000) { let vc = db.get(`vcchannel_${member.guild.id}`);{ if (!vc) return; channels.join(vc); } console.log(client.commands.size) console.log('I m ready to Go | Thunder is OP') } })```
see this
math @long yew
@fluid basin but idk the code
then learn programming
yeah learn python then
how does one learn it
i believe conditionals, IO are the basics of a language
this is for a homework
@slender thistle u have any good resources for this person?
I personally would recommend w3schools
a few hours
lol
hey shiv I know what ur thinking
.....
spoonfeed bad
Not really, I don't mind helping out with a bit of spoonfeed
is anyone over here a bot dev?
for another task
i have to do them now
no JDA
java?
hard stuff
Anyway, I assume you don't need error handling, so:
- Use the
inputfunction to require user input. Convert the results tofloat. - I don't remember the formula for the area of a rectangle, so Google it and apply a bit of common sense. Save the areas in separate variables
- Use the areas variables and
ifstatements.if area1 > area2: print("area1 is larger")
python
yes java
ok
anyone got uncensored hentai API? 👉👈
@hoary hill bruh
xd
Anyway, I assume you don't need error handling, so:
- Use the
inputfunction to require user input. Convert the results tofloat.- I don't remember the formula for the area of a rectangle, so Google it and apply a bit of common sense.
@slender thistle ok thanks
iara is discord partner cool
well theres the infamous nekos.life api
yes java
@bright meadow which bot did u make?
I may be able to help out with more details in case you are stuck
@bright meadow which bot did u make?
@bright meadow which bot did u make?
@tribal dove I made @earnest phoenix, @earnest phoenix, @Idle Pokémon#0461 and I'm hosting and contributing @earnest phoenix
k
okay willi, question for you
Are you familiar with SQL queries
why is Delphi yelling "missing operator" at me
hello
can you post the whole query string?
@long yew i see you have another task there
@fluid basin yea
i transfer my bot to a team how do i remove it
u cant
well, all the crap between apostrophes but prepend SELECT * FROM my database_name WHERE
@next flax me?
uh show coddum
width = float(input('Please Enter the Width of a Rectangle: '))
height = float(input('Please Enter the Height of a Rectangle: '))
Area = width * height
print("\n Area of a Rectangle is: %.2f" %Area)
i got that
done
for one rectangle
that isnt a complete query btw shiv
Yes @viral iris you cannot remove the bot from a team once you add it
begin
s:='';
if (Checkbox1.Checked) and (Edit1.Text <> '') then
begin
s := s + z + 'Fio LIKE ''' + Edit1.Text + '%''';
if (z = ' ') then z := ' AND ';
end;
if (Checkbox2.Checked) and (Edit2.Text <> '') then
begin
s:= s + z + 'Tab LIKE ''' + Edit2.Text + '%''';
if (z = ' ') then z := ' AND ';
end;
if (Checkbox3.Checked) and (Edit3.Text <> '') then
begin
s:= s + z + ' nachisleno >= ' + Edit3.Text;
if (z = ' ') then z := ' AND ';
if (Edit4.Text <> '') then s := s + z + ' nachisleno <= ' + Edit4.Text;
if (z = ' ') then z := ' AND ';
end;
if (Checkbox4.Checked) and (Edit5.Text <> '') then
begin
s:= s + z + 'dolg => ' + Edit5.Text;
if (z = ' ') then z := ' AND ';
if (Edit6.Text <> '') then s:= s + z + 'dolg <=' + Edit6.Text;
if (z = ' ') then z := ' AND ';
end;
end;
//ShowMessage('Select * from Zarabotnai_plata where '+s);
Form1.ADOQuery1.SQL.Clear;
Form1.ADOQuery1.SQL.Add('Select * from Zarabotnai_plata where'+s);
Form1.ADOQuery1.Open;
@long yew yea, so do the second one now?
:^)
@long yew yea, so do the second one now?
@fluid basin idk how
it's "complete enough" in the other parts but not where I'm relying on Checkbox4
Hi, Guys I have a question, are the bot apps that contain the Nsfw feature verefied or not
is anyone over here a discord.py bot developer?
I couldn't give two fucks about sanitized input in this private project
maybe, just ask your question
Not sure if that's strict mode, but there's a double space
err
need help please
i transfer my bot to a team how do i remove it
I don't think so
but i won't
' AND ' + ' nachisleno >= '
What do you mean you won’t?
width = float(input('Please Enter the Width of a Rectangle: '))
height = float(input('Please Enter the Height of a Rectangle: '))
width2 = float(input('Please Enter the Width of a Rectangle: '))
height2 = float(input('Please Enter the Height of a Rectangle: '))
Area = width * height
Area2 = width2 * height2
print("\n Area of a Rectangle is: %.2f" %Area)
print("\n Area of a Rectangle is: %.2f" %Area2)```
this ok?
You CANNOT remove your bot from the team you added it to.
z is the AND part, FakE
as in, on the second last line
@zealous sable what if i remove the team?
ah, no, no missing spaces
@long yew https://tryitands.ee
z is by default a space, actually
I do even see 2 spaces in ur error message
how do i make it say which is larger?
give me a second
' nachisleno
As webswinger said @viral iris I believe you will need to make a new bot application if you want it out of the team
whyyyyyy
yup unfortunately
do you think dolg <=5 might be invalid?
maybe you can contact discord support
which will take more than 5 mins
the filter part is there
and that gives you the missing operator error?
just make sure the spaces are set correctly:
Form1.ADOQuery1.SQL.Add('Select * FROM Zarabotnai_plata WHERE '+s);
s:= s + z + 'nachisleno >= ' + Edit3.Text;
if (Edit6.Text <> '') then s:= s + z + 'dolg <= ' + Edit6.Text;
The rest works just fine
if (Checkbox4.Checked) and (Edit5.Text <> '') then
begin
s:= s + z + 'dolg => ' + Edit5.Text;
if (z = ' ') then z := ' AND ';
if (Edit6.Text <> '') then s:= s + z + 'dolg <= ' + Edit6.Text;
if (z = ' ') then z := ' AND ';
end;
I doubt spaces are the issue
just make sure the spaces are set correctly:
width = float(input('Please Enter the Width of a Rectangle: '))
height = float(input('Please Enter the Height of a Rectangle: '))
width2 = float(input('Please Enter the Width of a second Rectangle: '))
height2 = float(input('Please Enter the Height of a second Rectangle: '))
Area = width * height
Area2 = width2 * height2
print("\n Area of the Rectangle is: %.2f" %Area)
print("\n Area of the second Rectangle is: %.2f" %Area2)
how do i compare them to find out if area or area2 is bigger?
Fio LIKE 'uwu%' AND Tab LIKE 'owo%' AND nachisleno >= 2 AND nachisleno <= 5 AND dolg => 1 AND dolg <= 7
this is the final string used as a filter
how do i compare them to find out if area or area2 is bigger?
@long yew https://www.w3schools.com/python/python_conditions.asp
just read it
AAAAAAAAAAA USE F-STRINGS OR .FORMAT
OHHHHHHH
just make sure the spaces are set correctly:
Form1.ADOQuery1.SQL.Add('Select * FROM Zarabotnai_plata WHERE '+s);
s:= s + z + 'nachisleno >= ' + Edit3.Text;
if (Edit6.Text <> '') then s:= s + z + 'dolg <= ' + Edit6.Text;
Just added a space after WHERE since a string is required anyways or the query will fail
Space before nachisleno >= doesn't make sense anyways it in this example
And the one you solved by dolg
thanks so much
the query won't fail for that, FakE
z is set to a space by default and it's appended at first
inb4 there's some unknown to god zws
didn't notice this fact, because I dont see u have defined z anywhere to be a whitspace

The russian error message said something about an irregular syntax (xxx operator) ...
did the missing space in dolg solve the issue now?
just make sure the spaces are set correctly:
Form1.ADOQuery1.SQL.Add('Select * FROM Zarabotnai_plata WHERE '+s);
s:= s + z + 'nachisleno >= ' + Edit3.Text;
if (Edit6.Text <> '') then s:= s + z + 'dolg <= ' + Edit6.Text;
@boreal iron use prepared statements, thank you
Negative
what does the finished query look like if the error occours?
Select * from Zarabotnai_plata where dolg => 2 AND dolg <= 5
width = float(input('Please Enter the Width of a Rectangle: '))
height = float(input('Please Enter the Height of a Rectangle: '))
width2 = float(input('Please Enter the Width of a second Rectangle: '))
height2 = float(input('Please Enter the Height of a second Rectangle: '))
Area = width * height
print("\n The Area of the first Rectangle is: %.2f" %Area)
Area2 = width2 * height2
print("\n The Area of the second Rectangle is: %.2f" %Area2)
if Area > Area2:
print(" The area of the first rectangle is bigger than the second")
if Area2 > Area:
print(" The Area of the second rectangle is bigger than the first")```
Oh found the issue
hehe gimme a second to show u
shivaco is it correct?
@long yew did you try it?
@slender thistle dolg = INT ?
ok yeah found it, one sec
ty
@slender thistle
Select * from Zarabotnai_plata where dolg => 2 AND dolg <= 5
It should be >= not =>
Wrong operator
I want to kill the person who wrote it
s:= s + z + 'dolg => ' + Edit5.Text;
to
s:= s + z + 'dolg >= ' + Edit5.Text;
Declined for banned owner 

Anybody play Growtopia Private Server??
anyways, sometimes it's such a small thing...
wrong server to look for help with that server anyone familiar with it
ikr, I was stuck on this for hours already
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
```I'm getting internet server error when I try running my django app with apache2. Does anyone know why?
know how that feels,
[git] I have this Rust file I'd like to commit to git, but in the file, I:
- Added missing documentation.
- Created a macro to follow DRY - don't repeat yourself.
- Edited some output text to include the maximum number of something (
x/y=>79/100).
The issue isn't necessarily the source code, but rather how to write a good commit message. Should I try breaking the changes into separate commits? Should I try being more abstract on the subject line (for the changes), then explaining the other changes in the body?
For reference, I've been reading this guide on how to write a good git commit message: https://chris.beams.io/posts/git-commit/.
More information about this error may be available in the server error log. What does the apache error_log say?
let me check
The staff at a local company raise money for charity. The company will top up any money raised using the following rules:
• Any money raised less than £1000 gets a £100 bonus
• A value between £1000 and £2000 will get doubled
• For any value over £2000 the first £2000 is doubled.
Create a program that will ask for the amount raised and display the bonus added and the new total raised.
anyone know what to do?
@boreal iron
@long yew it's just simple math
@sudden geyser
Should I try breaking the changes into separate commits?
It would be easier to keep track of the changes in separate commits, in my opinion, and that's more convenient in my cases
if less than 1k, bonus is 100. If between 1k and 2k, multiply. If over 2k, return 2k
if less than 1k, bonus is 100. If between 1k and 2k, multiply. If over 2k, return 2k
@sudden geyser im not good at python
Read up on if conditions and basic operators like the multiply one (*). The assignment is to create a program to solve the problem, so it wouldn't be good if I were to give you a demonstration.
Again, apply input, but this time convert it to int datatype
Then once you do that, apply if statements (conditions)
Instead of explaining u what's written on the website, just Google, wsgi no module named encodings which should solve ur issue quickly
stackoverflow should contain ur solution
Interesting
Is this helpful?
I think so
Probably Presence Intent or Server Members Intent : NOTE: Once your bot reaches 100 or more servers, this will require Verification and whitelisting.
can someone explain how the f postman does whats its suppose to but axios doesnt? i assume data is the body of the request, but aparently not
don't use axios 
basically
@boreal iron Do you know what's causing my issue?
Haven't got it post my data to my PHP file, too, just got a 400 bad request, too
idk, axios sucks
Try to send a request to https://my-life-is-a.fail/test and see what you get
axios definetly work
yea but differently to what u think
why do people use axios so much

theres like node-fetch
though im clearly doing some dumb shit
why do people use axios so much
@fluid basin i have no clue
which is great if you're coming from browser
there is node fetch indeeeeeeed

also xmlhttprequest is long but intuitive to me :l
anyway
snekfetch
theres like node-fetch
Uh... good idea tho, gonna test it out
@opal plank did you check axios docs
right here
👀
examples may be wrong/misleading sometimes
wait wtf it doesn't have an api reference
nanitf

welp
aparently you arent suppose to use data for the message payload

nothing to do with the axios docs

axios.post(url[, data[, config]])

data doesnt need to be in there
aye
did add that wrongly as well
to lazy to scroll down to https://www.npmjs.com/package/axios#request-method-aliases
life can be easier sometimes not being lazy lel
so I assume it is working now? @opal plank
if you want data to be there, you have to follow the full syntax
@fluid basin https://cdn.discordapp.com/attachments/272764566411149314/768453348600184872/unknown.png
basically this
like method and url both in the object
i dont get why people like axios
ah yes bent
||people who use request are outdated and also like using var, you prehistoric mofos||
That's racist, give axios a chance, too!
nah
just because it's uglier
request has the good thing of auto-converting the response to the intended type
and plus it supports chunks and compression
90% of the time you will be using these libs to interact with a specific api or service
therefore its much better to write purpose specific code
although bent's response type/status checker seems kinda weird to me
well its great for consuming apis where the response is known
not generally my case, i use axios for tons of different apis
but not really for scraping/reading site data
theres twitch, oauth, discord, my own api, localhost requests, some janky af shit i found out while digging for trash api, and some others
Im looking for a bot that selecting a random voice channels (with a user in it). For a different way to giveaway to people.
Im looking for a bot that selecting a random voice channels (with a user in it). For a different way to giveaway to people.
@bleak crypt search it up on the website
raise TypeError('Callback is already a command.')
TypeError: Callback is already a command.
[Program finished]
Wtf is this?
@earnest phoenix it....is....though....
sarcasm
@vocal sluice I can not find a bot that does this
oh, i didnt see the msg above
show your code Sloth
@bleak crypt #development is probably not the right place to look for bots
show your code Sloth
@slender thistle ok
How much does it cost to code your own bot?
@commands.has_permissions(manage_channels=True)
async def lock(ctx, channel: discord.TextChannel = None):
channel = ctx.channel
overwrites = {ctx.guild.default_role: discord.PermissionOverwrite(send_messages=False)}
await channel.edit(overwrite=overwrites)
await ctx.send("Succesfuly Locked the channel!")```
You can learn coding for free
Wait
I prefer someone code it for me. How much would it cost me?
I foun an error
-hardrequest
You seem to have asked for a very specific bot/feature. You likely won't find it on the site if you haven't searched already. You can try and put a request on Fiverr or Freelancer.
or if you feel like being countless hours of pain, selflearning is an option
depends on what type of features you want and how much the developer is willing to charge.
I prefer someone code it for me. How much would it cost me?
@bleak crypt for me it would cost me for a nitro classic

And what's type of features you want?
@slender thistle help meee
@sick fable Plenty of different features
@bleak crypt Like?
@sick fable Just a moment..
I foun an error
doesn't explain what the other error was
help meee
K
raise TypeError('Callback is already a command.') TypeError: Callback is already a command.
[Program finished]
That's it
@sick fable First of all. How much would it cost to host a discord bot?
Lol wait
@slender thistle

lol
What the environment variable to load a ca cert in nodejs?
@sick fable First of all. How much would it cost to host a discord bot?
@bleak crypt it would cost around two dollars a month and I found one website which host's bot for free
Don't do free hosts, they are unreliable and can steal data like your token.
Check out something like Pebblehost
they got a very cheap discord host
or yeah a vps
Oh
you can also host other projects with the vps
ye
i think ReviveNode has a pretty cheap vps
raise TypeError('Callback is already a command.')
TypeError: Callback is already a command.
Anyone gonna help me or nah? 😦
show code?
show your full code
is Callback a var
If you are unsure you can help, please don't blindly guess
show your full code
@slender thistle bruh, that's what I just sent previously
one command isn't full code
@commands.has_permissions(manage_channels=True) async def lock(ctx, channel: discord.TextChannel = None): channel = ctx.channel overwrites = {ctx.guild.default_role: discord.PermissionOverwrite(send_messages=False)} await channel.edit(overwrite=overwrites) await ctx.send("Succesfuly Locked the channel!")```
@sick fable this?
if the code is too big, put it in a pastebin
ok
My codes reach 500 lines above
@sick fable @slender thistle
if the code is too big, put it in a pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
if the code is too big, put it in a pastebin
Lmaoo k
this is proly a stupid question but in my index.js where would i put this code
client.user.setActivity('-user_invite', { type: 'PLAYING' }).catch(console.error);
doesn't it go after the first console.log?
line 86
btw sloth if ur token is in there thats not very smart
It would be easier to keep track of the changes in separate commits, in my opinion, and that's more convenient in my cases
@slender thistle the only issue I see with breaking up commits is if the code doesn't work because of it / is outdated.
@slender thistle k
You applied the command decorator twice
@slender thistle the only issue I see with breaking up commits is if the code doesn't work because of it / is outdated.
@sudden geyser Well, most of the time I apply changes regarding one feature/issue (say, fixing a random error), save a commit, apply other changes, then apply another commit to ensure they are "separated"
hey shiva, may you can help me right now...
Take my opinion with a grain of salt, though. I don't use Git enough to really deem my opinion "correct enough"
reason: unable to verify the first certificate do you know how to set the cacert.pem in nodejs, the environment var doesn't exist
Can translate the error into russian if that helps 
I speak English well enough to understand it 
nvm will find out somehow
node.js is not understandable to you... pretty ez ngl
Hi,
My bot got approved today but when I search my bot's name in the search tab my bot dosent shows up
search seems broken
really?
I search for mudae and I got it
@barren cipher maybe you can find it manually on "New bot" tab
OMG WRONG MENTION
So I'm working on this way to fight mobs, now I have this issue, the fighting sequence is handled in a FightHandler (wich is a class) the class is called when the command is called. Now ofcourse I don't want multiple fights in the same channel or multiple fights by the same user thats why I have this piece of code at the top of my fight command
if(this.client.activeUsers[message.author.id]) return message.channel.send("You already have a fight running, please end the fight before starting a new one.")
if(this.client.activeChannels[message.author.id]) return message.channel.send("Couldn't find any monsters in this channel, try a different one.")
Now the issue is, if they do the fight command to start their battle everything goes fine, but when they do the command again it stops collecting messages for their previous fight, making it so they can't end the fight. This probably has to do with the return keyword but I don't know a different way to do it, does anyone have a solution?
how does one do that
@long yew do what, the screen clipping tool?
what is wrong with that
@long yew do what, the screen clipping tool?
@sudden geyser the question but i read it wrong
Convert string to int before trying to use it as int
input returns a string
You cant compare a number with a string
Probably
Are you all doing his homework? lol
when dealing with money, you'll typically use a high-percision floating value
to see if x is between 1000 and 2000 you can use the mathematical equivalent
integer
means whole-number
float means floating-percision. Basically the ... part in 3.1415...
Since a computer can't store something that repeats infinitly
ohhh
So it is precise up to how ever you want it to be
>>> l = []
>>> x = 0.1
>>> while x <= 1:
... l.append(x)
... x += 0.1
...
>>> l
[0.1, 0.2, 0.30000000000000004, 0.4, 0.5, 0.6, 0.7, 0.7999999999999999, 0.8999999999999999, 0.9999999999999999]
Float precision!
right
because and < b but what is b less than? You don't specify
So I'm working on this way to fight mobs, now I have this issue, the fighting sequence is handled in a FightHandler (wich is a class) the class is called when the command is called. Now ofcourse I don't want multiple fights in the same channel or multiple fights by the same user thats why I have this piece of code at the top of my fight command
if(this.client.activeUsers[message.author.id]) return message.channel.send("You already have a fight running, please end the fight before starting a new one.") if(this.client.activeChannels[message.author.id]) return message.channel.send("Couldn't find any monsters in this channel, try a different one.")Now the issue is, if they do the fight command to start their battle everything goes fine, but when they do the command again it stops collecting messages for their previous fight, making it so they can't end the fight. This probably has to do with the
returnkeyword but I don't know a different way to do it, does anyone have a solution?
how can i put these panels on different rows if they dont fit inline on the viewers screen?
@barren cipher maybe you can find it manually on "New bot" tab
@open rune try searching Zhane
@queen crescent
If you use flexbox (display: flex;) you can wrap them in flex-wrap: wrap that way if the it doesn't fit the screen it will switch to column format
ty

anyone knows a solution for my issue?
Have you tried using element inspect to see where the fuck the other 2 panels went?
there not there at all
My first assumption would be that you have fixed height on the panel-container and so it won't allow them to fit under each other because of that.
But, use devtools, they exist for a reason
Now the issue is, if they do the fight command to start their battle everything goes fine, but when they do the command again it stops collecting messages for their previous fight, making it so they can't end the fight. This probably has to do with the return keyword but I don't know a different way to do it, does anyone have a solution?
@tulip ledge are you removing the user from the object once the fight is over, or is nothing happening? If it had something to do withreturning, it would send a message in the channel like the code you shared.
@sacred cypress
can i send u the domain instead so u can view source?
yes

Compete against some of Fortnite's greatest professional creative warriors or take part in the safest wagers.
is there any free hosters with a glitch bot
@sudden geyser I don't think u get what I'm doing, yes I'm removing the user and channel from the object the return is whenever you do a second fight. So basically doing !fight works, but if u do !fight again before the first fight is done it returns sending the message and that makes it so u can't finish ur previous fight
I understand now, can you share your source code via hastebin
huh
mmmh... I'm rlly protective of my code
why is this happening?
If you don't want to share, that's fine. It's just harder to help.
Anyway, the fight being left in an undefined state (doing !fight before the second fight makes it so the user can't finish the first) is likely due to what you were saying about returning early. However, I can't see your source code to figure out where it's coming from. Some where in your code base, you're exiting the scope and not allowing to listen for more messages. One example would be returning in the outer scope rather than in the collector listener.
you're doing something that is affecting the state of the previous fight before the return line
Tim, I trust u can I send u my source code in DM's?
ye
Hey @quartz kindle do you know why this happens?
close code 1000 is a generic error, aka "unknown error"
usually is something wrong with the connection
nothing you can really do about it
so it reconects with no reason?
@tulip ledge do this: start a fight, then send any message that is not one of the fight moves
then try using a fight move
does it still work?
you set isProcessing to true in the collector, then if the message is not a fight move, it returns, but the isProcessing is never reset back to false
oh wow yeah
It's working now 😄 thank you so much! ❤️
You always amaze me, your brain is literally on a different level lol
lmao
ok
so i have a music bot written with Discord.js. I want my bot to remain the VC for a short period of time instead of leaving. How do i make stay?
Guys https://store.steampowered.com/app/682130/Discord_Bot_Maker/ its a good bot maker ??
Discord Bot Maker is a powerful bot development tool for the #1 text and voice chat service for gamers: Discord. With this tool, you and your teammates can take your social experience to the next level!ExplanationOne of the most prominent features provided by Discord is the of...
$9.99
1373
no
no
question: So i have a music bot written with Discord.js. I want my bot to remain the VC for a short period of time instead of leaving. How do i make stay?
async play(guild, song, message) {
const serverQueue = await this.queue.get(guild.id);
if (!song) {
let leaveEmbed = new MessageEmbed()
.setTitle("Queue Empty")
.setDescription("I left the voice channel because no one played a song.")
.setColor("PURPLE")
message.channel.send(leaveEmbed);
this.manager.destroy(guild.id);
this.queue.delete(guild.id);
currently i have this it immediately leaves
Code the bot yourself
Yep, there's a million of tutorials.
But I dont where I can start learning python :C
For all those people who find it more convenient to bother you with their question rather than search it for themselves.
https://discord.js.org/#/ - javascript (if u want to use js)
Ty guys ❤️
🙂
What its more easy, python or js
İ cant do my bot pls help!!!

I am hosting on something.host and it keeps saying "<p>The owner of this website (discord.com) has banned you temporarily from accessing this website.</p>"
I would always say use JavaScript
But thats just personal preference
@native quiver Sounds like you need to contact something.host
ok
İ dont now what is Java script
@upper belfry Please explain further your issues
You need to be able to use a coding language to code a bot.
If i use python or something like discord.py , my computer just gonna say “ err pip (and something else that i forgot the name ) doesn’t exists blbl
I am hosting on something.host and it keeps saying "<p>The owner of this website (discord.com) has banned you temporarily from accessing this website.</p>"
@native quiver Oh, dont worry. Aris it's trying to fix this. He will buy another hosting service.
@drowsy socket You need to install python onto your computer
Mmmmm..... Ok .....i cant finded the answer so...ok...
I tried but the situation is complicated to explain
İs there translate or something?
I believe this is the discord.py documetnation https://discordpy.readthedocs.io/en/latest/
@upper belfry Basically you need to learn a language like Javascript or Python. There is a million of tutorials online for free. Maybe even in your language.
I have a question about the ping on #support . Am i allowed to use ghostbot for my bot ? I don’t understand the ping about the “ clone “
Clone means you cannot copy the code of another bot
@upper belfry Temel olarak Javascript veya Python gibi bir dil öğrenmeniz gerekir. Ücretsiz olarak çevrimiçi olarak bir milyon öğretici var. Belki kendi dilinizde bile.
What is javaScript and Python
ez google translate
they're programming languages
Clone means you cannot copy the code of another bot
@zealous sable oh okay
Thank you brooo
np
Btw, there are Spanish python/js tutorials ??
I can find python books in spanish? https://www.amazon.com/Python-Spanish-Programming-Languages/s?rh=n%3A285856%2Cp_n_feature_nine_browse-bin%3A3291439011
Im sure youtube will have some
Ty
would this be correct syntax: @has_permissions(manage_channels = True)?
@untold sand Well generally all free hosting solutions aren't the best. Repl.it/Glitch will work but if you need something more serious, you'll need to pay.
I use aws for free
Depending on your knowledge you could get a server that's ready for Discord bots, or a VPS which you can customize to your liking.
would this be correct syntax: @has_permissions(manage_channels = True)?
NO
@modest smelt AWS has a 12 month trial or there's some really free plan?
Oop-
would this be correct syntax: @has_permissions(manage_channels = True)?
Sorry-
can someone please help me.
yes it would
ok









