#dev-general
1 messages ยท Page 151 of 1
who needs . and {} anyway
me=
parens for everything
oui?
respect for you went down by 37%
{} looks better
And no you did not convert that correctly im afraid lol
๐ฆ
HHAHAHAฤลพ
was I on the right lines?
isActive could be a property
no
val isActive: Boolean
get() = endsOn - System.currentTimeMillis() > 0
wtf
lmfao this man's eyes being opened
lol
whats get()?
Is that a getter
a getter
doesnt work
disgusting
for me
Clojure looks like this imo
Lol
exaggeration
Should be String.MAX_VALUE tho Ori
which is pure cancer
doesnt work
why not?
getter doesnt work for me
?
its just red
did you paste what I put?
ye
show code
The syntax is interesting it might be fun to learn
@heady birch take that back. u know u dont mean it
I am a magician 
nvm works now i had to remove one part of my code
y'all are just too dumb to understand clojure
(defn -main [& _]
(let [r (range 1 450)]
(println (reduce * (first (filter (fn [triplet] (= (reduce + triplet) 1000))
(for [a r b r c r
:let [prod (+ (* a a) (* b b))]
:when (= (* c c) prod)]
[a b c])))))))``` don't tell me this isn't readable
(((((((((no)))))))))
just sec let me find old slimefun code
i cant tell if ur joking or not
bit of both
cus that is NOT readable at all
hopefully the last clojure u will ever write
๐
Better frosty?
was I on the right lines?
@prisma wave well if you did write that thing in clojure you'd probably do a few things differently to begin with (such as the utils)
Whens sxtann coming back
Do you want the entire thing as a direct equivalent?
sure
sx is gonna become like songoofda and get the word banned
Dear fucking god what have i done
Lol
Yes Ori
ok, let's do this with pattern matching
Bruh
wow
you want it?=
not all men are like that
lol
now put it in allman
What the hell happened here Ori?
not sure honestly
๐ฌ
(defn -main [& _]
(println (reduce * '(1 2 3 4))))```
clojure haters will say there are too many parens (there's 8) but in kotlin this code has 8 parens and 2 curly brackets AND a double colon
```kotlin
fun main()
{
println(listOf(1, 2, 3, 4).reduce(Int::times))
}```
conclusion? clojure good kotlin bad
wtf
println(listOf(1, 2, 3, 4).reduce { i, other -> i.times(other) })``` it can be worse
i think i'll slowly change my bot to kotlin
Dont you just love refctoring
8 parens and 2 square brackets, compared to 8 parens, 2 curly brackets, 1 keyword, 1 ., and a function reference
Clojure doesnt exist. Prove me wrong

very fun
clojure has less syntax than kotlin therefore it's easier to learn therefore better

@dusky drum Liskov - don't use HashMap, use Map or MutableMap
Conjure is a conspiracy theory
Clojure isnt real tho
why mutablemap?
clojure is superior ๐ฎ
Johnny has been typing for like 10 minutes I'm getting scared ๐

Liskov substitution principle
why mutablemap?
Kotlin handles collection mutability in the type system - Map doesn't have put(), remove, etc, MutableMap does
Solid advices
What is SOLID?
S - Single-responsiblity principle
O - Open-closed principle
L - Liskov substitution principle
I - Interface segregation principle
D - Dependency Inversion Principle
If you wish to read up more on it, you can check here:
https://scotch.io/bar-talk/s-o-l-i-d-the-first-five-principles-of-object-oriented-design
Unless you need the map mutable, just use Map
I still gotta figure out this but i am stupid and i didnt pass math in my gcses
how do you know you didn't pass
Not done a math lesson since year 8 = failing maths
๐
johnny coming up with the lies on how they didnt eat the sugar
johnnys writing like harry potter or smthn I think
he's writing a new culture
Whats cooler than yaml these days for configs
JSON
i do this all the time, i have my mic mute button on 5 so if i mute my mic itll type "5" and ill forget to remove the letter
json 
^
I think I give up, this code is so terrible I would change it too much
THATS
it doesn't even work correctly
Nooooo
lol
nvm
i thought he just left it afk
nothing
what a shame
oh well
the moral of the story is clojure good kotlin bad
this is actually erroneous
it will throw an array index out of bounds exception
just say wrong

lmfao
yet another problem that clojure doesn't have
love me 
Kotlin good, Java good, Clojure good, all good for some people for some purposes
without java there wouldn't be kotlin 
Java bad
java bad
Java is good for some things yes
clojure
clojure good
objectively good
Java is good for some things yes
such as?????????????????????
creating god languages like Kotlin 
When you can't use Kotlin 
if i ever worked for someone who was like
No kotlin
i would just

and use kotlin
epic
jesus christ
i would savagely beat them to death and hold their family hostage until they converted the entire 100,000 line codebase into kotlin
:)
๐
Must be more than 100k
very good theme
ew
No
yet there doesn't exist a gray-white theme

๐คฎ
wth

that green is pretty gross
thats because of my taskbar i think
notepad lookin
what about a tint of purple?
thats yuck ori
im aware
ew
altho it does match ur desktop background
but thats besides the point as u never see it
this is better?
am i doing stuff wrong:
never used maps in kotlin and i've never used kotlin before
fun addStringData(path: String, data: String){
this.stringData[path] = data;
}
i get unsupportedoperationexception
if i do stringdata.put i get some wierd message saying i should do stringdata[path]
ok I don't wanna do y'all like this
better?
(defn -onCommand [sender cmd label args]
(letfn [(send-format [name arg]
(.sendMessage sender (TextUtil/colorFormat (.. messagesData (getMessages) (getString name) (replace "{0}" arg)))))]
(if (.hasPermission sender "simplecrops.command.clean")
(if-let [player (or (and (= (alength args) 1) (Bukkit/getPlayer (aget 0))) nil)]
(send-format
(if (.cleanPlayer dataManager (.. player (getUniqueId) (toString)))
"cleanCommand.successfully"
"cleanCommand.error")
(aget args 0))
(send-format "noPlayer" ""))
(send-format "noPermission" "simplecrops.command.reload"))))
```here you go
wow
omg
you did it
ima throw up
so noone can help me ๐ฆ
No one wants to
avec quoi?
@lunar cypress 2 things
- I replied to your PR with a few suggestions
- what does
..do?
well i sure dont want to
songurda demon
What's another word for specializing, but to sound less like you know the actual topic?
.. is a macro for chaining java methods
i see
on a scale of 1-10 how bad is raw use of a parameterised class?
๐
Fuck off
@jovial warren like 2-5 depending on the circumstances
good one ori

What's another word for specializing, but to sound less like you know the actual topic?
whats wrong with specializing
ie.
I specialize in Java
but not professionaly
i am enthuasistic about java
focus, interest, enthusiast
yeah focus would work too
Since to me "specialize" sounds like you actually know what you're doing 
i like java
true lol
"I focus on Java"
api design is fun
my kinks are good pcs 
Hello please find attached the API for review
is this malware?
yay
no
kotlin is malware because its so infectious 
ban niall for giving us malware
does this like
bruh it was 403ing me for like 3 days now
can PDM do compile dependencies?
fix everything?
hard depends, not just soft depends?
oh
like
๐ฎ
its an api
application programming interface
I feel like Niall's mind is somewhere else at all times
Good enough? https://github.com/Frcsty
not bad
it seems to always give A+
Sheesh, thought it was broken
best language to make a good performance pc app?
electron?
no lol
isn't it good?
probably not what you want for high performance
electron will be fine most likely
I just want an easy, powered and kinda good performance
welp never used JS so that sucks
and don't wanna use java
cause.. ye
..
..
ya know
java + swing/fx
but isn't java a bit too heavy?
not really
uses ram like it's a juice
no just on memory really
definitely faster than electron
and it more reserves the memory than actually using it
it's just faster with everything
^
Final one looks good enough
||https://github.com/Frcsty||
@prisma wave https://bin.bardy.me/URXcDgYj.php I know this isn't actually that good as it is but how's it in this case?
@hot hull Great spelling
@jovial warren i would cast to Map<?, ?> just to avoid the warning
otherwise looks pretty much fine
okay
@lavish notch Made by Piggy 
i must say i quite like the Kotlin, except its syntax is a bit wierd for me
You'll get used to it
Is there anywhere that I can find a tutorial to write a custom bot? Just like the basics
Tag me please.
like discord bot?
@hallow folio i'd assume you want to do it in JDA https://github.com/DV8FromTheWorld/JDA. You can follow their setup in the readme
Also, check out Menu Docs jda4 and 3 tutorials if you already know java
yo so whats that software for auto java to kotlin code stuff?
IntelliJ
okay so how to use it?
ctrl + alt + shift + k
Hey @ocean quartz say someone was to rewrite MF in Kotlin and change it from being annotation based to like, variables and stuff, how would one go about doing that? I've already converted everything that isn't the annotations, but I have no idea how I'd create and hook up my own command classes
So instead of like
@command("a")
someClass() {
@Default
fun whatever(args) {}
}```
It'd be like
```kotlin
val aCommand = Command("SomeName")
acommand.default(someArgs) {}```
Idk how to hook up Command to Matts existing stuff tho, since using that'd save me from writing my own
You can't, it's not ready to be used without annotations
uuu yes my bot is now kotlin howly. :3
F
wait
So what roughly needs to be altered?
some stuff isnt kotlin
Basically the core of the command manager
It'd work on the JDA one since I made it different
I will rewrite it at some point to make it better and that'll be possible, but idk when
I swear these people convert every single soul
Indeed
When shall they learn
im confused here so thats what intellij did itself from java to kotlin idk what im supposed to put there?
http://images.virtusdevelops.eu/shareX/5gf9uhq5.png
says name
Well, guess my dreams are shattered Matt
I can do that a bit later
Gotta try understanding parser first, was talking with Sx and i am even more confused about this stuff xD
i seee
oke
got it working
my pc is so fast it takes ages to change from java to kotlin sometimes
gasper pc bad lol potentially ?
target label does not denote a function, those !! are added by intellij i just ran java to kotlin
i'll do most fixing later
intellij added iut
?
actually maybe you do
how would i change this, im pretty new to kotlin :3

for now just use return@Predicate
yeh no idea what that is
nvm
im stupid
so something like this:
http://images.virtusdevelops.eu/shareX/ipy8p2o4.png
oh
I mean
that's not what I said but that should work
although it's incredibly ugly with that formatting
well i googled up stuff and i found that
and now i have another issue
event ->
idk what intellij changed here.
http://images.virtusdevelops.eu/shareX/xe9r6525.png
wait did you just convert everything at once?
no
where is that inner?
in the definition of ChatConfirmEvent
?
any C#'ers
Yugi knows C# I think
I just need some C# code optimized
@dusky drum ?
i still have no idea where that inner is
in the definition of ChatConfirmEvent
is that one of your classes?
or from a library
i see
When you don't even know what class is yours :p

did you remove the inner
When people say they have thousands of Twitter or youtube followers/subs, but you got this 
why da frik it says its still inner???=???
tahts not inner:
http://images.virtusdevelops.eu/shareX/z3fkvl4p.png
send the full code
the chat one or the one thats not working?
lol it says its java XDDD
in java it was
AbstractReactionUtil reactionUtil = new AbstractReactionUtil(user, chatInfo -> {
}, message.getJDA(), "โ", message.getId());
reactionUtil.setOnClose(() -> {
ticketStorage.deleteTicket(info.getUserid(), info.getChannelID());
deleteChannel(channel);
});
frik
i sent wrong stuff
...
send AbstractReactionUtil
also, wut is this
val reactionUtil = AbstractReactionUtil(user!!, AbstractReactionUtil.ChatConfirmEvent {
_: AbstractReactionUtil.ChatConfirmEvent? ->
}, message.jda, "โ", message.id)```
IJ conversion ain't perfect
i am pretty sure it could just be ```kotlin
val reactionUtil = AbstractReactionUtil(user!!, { }, message.jda, "โ", message.id)
which will probably fix your problem too
let me try
depends what ChatConfirmHandler is
user
!!
ew
indeed
okay so OnClose still doesnt work
can't fix it without seeing the code
it says OnClose doesnt have constructor
well
where does it say that?
reactionUtil.setOnClose(AbstractReactionUtil.OnClose {
ticketStorage.deleteTicket(info.userID, info.channelID)
deleteChannel(channel)
})
yeah kotlin doesn't let you do that
however
that entire interface is pointless
just use a first class function
?
functions are "first class" in kotlin, meaning you can interact with them just like any other value
so kotlin val someFunction = { println("Hello") } is possible
what that means is that you don't need Functional Interfaces like Java has
you could just take () -> Unit
which is the equivalent of Runnable
hm
so
reactionUtil.setOnClose {
ticketStorage.deleteTicket(info.userID, info.channelID)
deleteChannel(channel)
}
ye it doesnt work anymore
it broke it ;8
sadly
so i create that class and then i listen in class for event when event is launched it launches onclose code.
?
I told you to change AbstractReactionUtil to not use OnClose
so what did you change it to?
How'???
just replace OnClose with () -> Unit everywhere
errors everywhere
its all red
var onClose: () -> Unit = {}
class AnotherClass {
blah.onClose = {
//hello
}
}```
you can use invoke
or you can just use onClose()
they are the same
why not?
ah it was private.
yeah
lets try if it works
I'd also recommend you don't have onClose be nullable, just make it no-op by default
uff man it works
:)
now i have to do same with chat one
chat one is a bit different
in java is something like this:
http://images.virtusdevelops.eu/shareX/9rjxs3e5.png
yeah
so you can use a first class function again
it would just be (ChatInfo) -> Unit
instead of () -> Unit
or whatever the class for chatInfo is
typically you would null check (or just remove the nullability if you can)
send it?
well
first i wait for user to send some input then i close stuff and again send stuff on onclose
so in main i wait for users stuff
onclose i run stuff
like before
ah yes
well the signature of ChatConfirmHandler is that it takes a ChatConfirmEvent and returns nothing
so it would be (ChatConfirmEvent) -> Unit
Unit is kotlin's equivalent of void btw
no?
I don't think so anyway
just use (ChatConfirmEvent) -> Unit instead of ChatConfirmHandler
where in abstract class or where i call it?
wherever you use it
i create it in abstract class
i sent you entire code of it
and then i use it in other classes like:
http://images.virtusdevelops.eu/shareX/2bj2w702.png
where da fk=?
wherever you use it
ITS RED
private val handler: (ChatConfirmEvent) -> Unit for example
ITS RED
that doesn't tell me much
apart from that you've done it wrong
eh
i missed comma
thanks for all the help, i would probably giveup if you didnt help me.
oih great
np lol
so invoke is same as just ()?
you might want to change the name too, since it's not really a handler anymore lol
yes
they are exactly the same
okay
Hmm what would be faster, a switch that'll handle each token on each iteration or loop through all tokens on each iteration?
example?
so is it ok if i just use like content!! or is it better to do it with null check?
for (character) {
switch(character) {
case TokenType.ASTERISK.getChar():
// handles mached here
break;
// etc
default:
}
}
// or
for (character) {
for (final TokenType tokenType : tokenTypes) {
if (currentChar != tokenType.getChar()) continue;
// handles matched here
}
}
null check is always better @dusky drum
possibly
there are lots of ways to null check in kotlin
you could use a default value with the elvis operator, or use the safe call operator
You'll love ?:
or just normally
^
@ocean quartz it probably won't make a difference; wouldn't your best option be a hashmap?
O(1) lookup time
Yeah that might be better, so something like: <'*', TokenType.ASTERISK>
yeah
Also changing how i handle escaping, instead of doing lookbehind i'll do look ahead, seems easier to handle
alrighty
is like safe call ok?
so better than !!?
which is not what you should be doing
pretty much
a?.b() = if(a != null) a.b()
๐ค
looks like you need to make a TrackOperation?
fixed that
why i still have that error there i did nullcheck.
http://images.virtusdevelops.eu/shareX/wjdbar18.png
compile time null safety
it could be null, so you have to check it properly
bear in mind that the value could change before
the easiest fix is just a temporary variable
val song = songsl[i]
if(song != null) {
blah
}```
aha
๐ฆ
nice lol
thats lavaplayer isnt it great
it doesnt shit that stuff out in java idk why it does it here tho
i mean it works
and my bot is now fully kotlin,ลพ
yay
hehe
and it works
thanks to your help
i just cant wait to get 100 warnings
in git commit
oh its just 20
matt ๐ญ
Clean
Don't think the resolvers will work unless you're on RC
RC?
1.4-RC
Yeah I am
Why convert it though?
Because I wanted to use your system but instead of annotations be able to do what I was on about earlier, so I converted it
Ah okay, that's fair xD
Nice, pretty happy with the changes to the lexer
https://github.com/ipsk/mf-msg/blob/master/src/main/java/me/mattstudios/mfmsg/base/Lexer.java
Will work pretty similar to discord when it comes to escaping
Examples:
*\**more*\*
*more*
\*text*
`*text
pretty sick
Just found a bug on discord lol
and yeah, now is the parser again, more headache but hey i gotta learn this somehow
Make MD put Kotlin in Spigot then
Hey
I need help with the DeluxeMenus plugin
Is there a variable to display enchanted items in a menu?
#general-plugins or their might be a deluxe menus specifc channel if you link your spigot acc
@prisma wave Does ANTLR create source code of parser/lexer or is it just runtime?
it makes source code
Oooh that's cool i might try it out then, i just need to see an example of a parser, this stuff confuse me so much
yeah parsers are tricky
there is a good wiki for learn about MongoDB? (Java Class, Commands) for add it in a plugin please
More ways to get started with MongoDB
Mongodbs official blog is a good way to start
thanks alot
@chilly zenith u of all people should know to just ask what you want
smh
I just need a program where I can input a name, select reason(s) and it copies to my clip board
@prisma wave is PDM ready for production? :0
So this is what I'm currently using for mob stacking, but it's unreliable, and honestly disgusting af, anyone got any suggestions as to what other approach I should take?
https://paste.helpch.at/sovapokuto.java
Thats a big filter
Yea not proud of it at all
not kotlin
ghost ping -_-
I have a question for the Kotlin Crusaders here, maybe you can help me out
Best database system for storing billions of live GPS tracks?
wat ta frik why billions?
yml obviously
.,.
Is it possible to invent new operators for Kotlin? I know you can overload existing ones and you can define infix functions that act as operators. But can those be any symbol as well? For example if I wanted arr1 ~ arr2 to mean arr1.append(arr2) or something of the sorts.
i forgot how was it called i used to know
it was insanly fast
like 1mil writes per 10ms
wat ta frik why billions?
@dusky drum Probs. got hired by the NSA to spy on the world.
@Niall Excel will crash on save after about 600k rows in my experience. Don't use any System that can be abbreviated by 2 letters...
XD
Niall some kind of SQL database?
You would have to use the name as far as im aware
@heady birch I was afraid so. Ty...
Isn't that like, their purpose
Lol
Best database system for storing billions of live GPS tracks?
@heady birch I really like OracleSQL for big databases.
postgresql is good.
Hmm yeah
but its kinda pain in ass to setup on vps or dedi machines.
So this is what I'm currently using for mob stacking, but it's unreliable, and honestly disgusting af, anyone got any suggestions as to what other approach I should take?
https://paste.helpch.at/sovapokuto.java
ho java, so no kotlin?
@empty flint might be interesting https://stackoverflow.com/a/37630881
@empty flint might be interesting https://stackoverflow.com/a/37630881
@errant geyser I just found that as well, thanks. Dunno why it didn't come up the first 3 times I googled "kotlin custom operator" but whatever...
I don't like that approach however
I Googled "How to make new operator functions in Kotlin"
'^' looks fugly. I wonder why they don't add that functionality, it would seem like they only need to allow infix functions to contain names containing any character.
ยฏ_(ใ)_/ยฏ
There aren't any open issues for allowing custom ones in the issue tracker, at least none that I could find
You might wanna try opening one
Yeah you can't make new operators
It would add a huge level of complexity to the parser
inb4 you go and add it to the Elara roadmap
It would add a huge level of complexity to the parser
@prisma wave Would it, though?
inb4 you go and add it to the Elara roadmap
@errant geyser Que? ๐
What is that?
There aren't any open issues for allowing custom ones in the issue tracker, at least none that I could find
@errant geyser There is this issue for example:
https://youtrack.jetbrains.com/issue/KT-1440
It's not the same but if they won't add these operators I don't think they will consider adding custom ones.
@prisma wave Would it, though?
@empty flint
Well, yes. The idea of lexing and parsing is that all of the potential inputs are essentially hardcoded. Adding a level of dynamicness to that would be much harder to parse
@empty flint
Well, yes. The idea of lexing and parsing is that all of the potential inputs are essentially hardcoded. Adding a level of dynamicness to that would be much harder to parse
@prisma wave Scala does it with no problem. The difference between parsing an arbitrary function name like 'dumbFunc' compared to '^' is minimal. The difference is that in the parser, a function name is probably defined as any alphanumeric chain of characters, optionally containing - or _ and starting with a letter. All they would have to do would be to allow infix function names to be any character at all except for numbers (and whatever else is reserved for hardcoded stuff, like you can't name a function 'func' I don't think, but that's already implemented)
Good point
I'm sure it's possible, it's just probably not high on their priority list
I'm sure it's possible, it's just probably not high on their priority list
@prisma wave That is the more likely issue, yes
I mean I would be happy with just adding binary operators and allowing all operators to be overloaded. That would include most operators anybody would need.
fun test(){
println("AHHh")
}
class HelloKt {
fun a(){
print("AHHH")
}
}``` what would this compile to lol
would the test method just go in that class?
Im just messing around lol
Try it and see?
It will probably be HelloKt1 or something
Adding it to the existing class could break stuff
it like....
public final class HelloKt {
public static final void test() {
String var0 = "AHHh";
boolean var1 = false;
System.out.println(var0);
}
}
``` completely got rid of the a method
unless the IJ convertor doesnt do the top level things
also whats var1 for lol
My guess is nullability
struct HelloKt {
}
impl HelloKt {
fn test() {
let var0 = "AHHH";
let var1 = false;
println!("{}", var0);
}
}
You sure it's not in a different class?
Its probably that the IJ convertor doesnt work like that?
I just hit decompile in ij
ill try and build a project in a sec
Build the project
And check the compiled classes
It will probably be in a separate class
Legit noone got any suggestions for my issue?
er
it just like
didnt compile
e: Z:\AHHH\src\main\kotlin\org\aj3douglas\ahhh\utils\Hello.kt: (1, 1): Duplicate JVM class name 'org/aj3douglas/ahhh/utils/HelloKt' generated from: package-fragment org.aj3douglas.ahhh.utils, HelloKt````
inb4 you go and add it to the Elara roadmap
@errant geyser Que? ๐
What is that?
@empty flint
The language me, BM, and Yugi are going to be making. It was a joke, ofc.
CompletableFuture<T> vs callback?
rust experts tag me please
@heady birch You seek wisdom?
Yes
hmmm
java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
do i need to shade entire kotlin into plugin:?
yup
omg
just relocate kotlin to your.example.thingy.Whateverthefucknobodygivesashit
thats gonna be like 1mb size
?
Who gives a shit about the file size
is it even worth making entire plugin kotlin=?
Yes
Ever heard of PDM?
no
This is essentially an MLM scheme now huh
Anyway
PDM will solve your file size problem
This is essentially an MLM scheme now huh
Precisely
I'm so glad you asked
Basically what PDM does is it downloads dependencies at runtime
interesting
It isn't perfect but it's worked fine for kotlin in my testing
Hm
I can't reliably answer that
But us MLM minions can
it seems to be mostly bug free but I've not tested it in production yet
Its perfectly untesed but defo works, you have our one microsecond guarantee
okay, for now i'll stick with just shading it into pl
It had 9 stars and now only 8
What idiots
:?
Oh yeah I'm eating breakfast rn
You confuse me
Pourquoi ?
How are you having breakfast at 1:02pm
Surely that should be classed as lunch/whatever its called now rather than breakfast though?
I mean I never have breakfast anyway soooo
true
im so god.
Webhooks do not require a Discord account and thus do not have to be used with a running JDA instance.
Yet in order to get a webhook you need a jda instance, or am I just dumb?
Someone who's familiar with JDA please let me know if I'm dumb or if there's another way 
I dont think you do
Only method I've been able to find for it is through the jda instance
https://github.com/MrPowerGamerBR/TemmieWebhook
Ive used this before in a website, and I didnt need a JDA instance anywhere
I'll take a look
I mean its a webhook, wouldnt you just have to send something to the url?
Yea but you need a webhook instance (atleast that's what it says on the GH tut), but I've only been able to get it through the jda
webhook instance?
alex now I also starred pdm
I just manually sent a webhook with postman frcsty
@steel heart ty
Java wrapper for the popular chat & VOIP service: Discord https://discord.com - DV8FromTheWorld/JDA
its probably possible with jda
but I mean
{
"username": "Frosty",
"avatar_url": "https://cdn.discordapp.com/avatars/307160296714403851/a08c9d65cc210cdc078d1baa1a5fa9a0.webp?size=128",
"content": "Test webhook"
}
``` You just gotta send the post webhook thingy, idk how to do it in java tho
Yea imma use temmi shit
that uses this
public void sendMessage(DiscordMessage dm) {
Runnable r = new Runnable() {
public void run() {
String strResponse = HttpRequest.post(url)
.acceptJson()
.contentType("application/json")
.header("User-Agent", "Mozilla/5.0 (X11; U; Linux i686) Gecko/20071127 Firefox/2.0.0.11") // Why? Because discordapp.com blocks the default User Agent
.send(gson.toJson(dm))
.body();``` and just does that
I did a webhook like this on my bot already ๐
Who
I used this unfortunately: https://github.com/MinnDevelopment/discord-webhooks
The same guy who contributed to JDA
unfortunately?
I mean, I was stating my different opinion to what Aj suggested above
fixed my issue
how could i close mutablemap in kotlin since atm i get issues (java.util.ConcurrentModificationException: null) ?
copy*
how are you doing it atm?
well
it's probably a 1 liner


