#dev-general
1 messages ยท Page 112 of 1
GD uses sha1 to download too :(
To verify the downloads?
afaik as long as it runs offline after initial startup it's fine
@prisma wave itโs ok so long you provide a place to manually download dependencies
๐
Yes
Would anyone be able to help me - My server keeps crashing and I have no idea why
logs
where is it
ok found it
=paste
Please use a paste service to share configs, errors, code and long logs.
โข HelpChat Paste
can I hire a good na dev to help me with some skyblock bugs
you must know what your doing (dont waste my time) I will pay you based off how much work you do
thankyou
SELECT id FROM punishments WHERE active=true AND expirationDate>NOW() AND type=0 AND target=`069a79f4-44e9-4726-a5be-fca90e38aaf5` LIMIT 54;```
LOL how is this not valid
Unknown column '069a79f4-44e9-4726-a5be-fca90e38aaf5' in 'where clause'
Wait
Do I need to select all the things like active, expirationDate and target?
why you even executing raw queries @signal tinsel
yes you are smh
Cuz you can't input direct strings
use ORM software
Only uuid int and bool
it handles the queries for you
for Java I recommend ORMLite
for Kotlin I recommend Exposed
raw queries are bad practice imo because of how easy they are to fuck up
Thats learning
and how annoying it is when you have to change them
yeah but for someone like me who doesn't always learn from his mistakes, I prefer to not make the mistake in the first place
but I suppose I'm just generally more used to using ORM anyway
you should still give ORM a try some time though
whether you plan on using it or not, you should always try out all of your options before you make a decision
lol
think so yeah
so do I
Something to make while learning
I'm rewriting my bot in Spring
try writing something like a bans plugin in Spring
with a built-in web interface
which means you cover Spring, Spring Data, and Spring Web
๐ฎ
is called bad code
thinking about making KiteBoard.get(Class<T>)
how about you completely remove that shit from your main class, because it doesn't belong there
in a dependency injection system called guice :3
๐ฆ
or in your case, spring autowired
like 600mb if you properly exclude spigot deps
oh yeah kb sorry
it's pretty nice
As they say
more injectors the better
uh LOL
Wait- how does this affect my api?
What are the consequences for third party applications?
How will this impact the reputation of our company?
niall inc.
monsters university inc
how 1) move your manager getters into a separate api singleton, or ya know, don't let 3rd parties use your internal components
what) they'll all break till they move to the above
how 2) your company will gain positive rep for inherently being made better, simply by having guice
mike wazOWzki
I already expose interfaces for the internals
then just move the shit to another class
if you want backwards compatibility, deprecate the stinky code
They want an api they said
They need an api they said
I dont think 1 person who wanted it has used it
Class CriteriaRegistryImpl is uninstantiable, and thus can not be bound
Why is it telling me that
Oh nevermind
Havnt updated constructor ๐
I hate managers lmao
why
837kb
No thats the base size for guice
guice is 729kb
I havnt compiled yet
Imagine shading
logger is already binded
the plugin logger?
no, just a java logger
Couldn't be me
if you're using paper, you may want to manually bind the slf4j logger
bukkit kinda guy
and yeah, server is a common binding
fyi, I wouldn't advise to add guice to an existing project
generally a project should be designed around guice
Ok thanks for telling me now ๐
Nah its fun I'm continuing
Api is only a month old so no problem if changing it
just imagine implementing spring onto an already existing project
would be pretty difficult to do right, without recreating the project entirely?
these libraries generally want you to code in a specific way, and you can't code in that way without the libraries
Ye
I totally see what you mean yeah
Looks like i will be injecting KiteBoardPlugin the most which doesnt feel right
is that your application's entry point?
only because of classes scheduling tasks
or whatever extends javaplugin
abstract scheduling then
exactly
you shouldn't ever need to inject your main into lower components, it's super bad practice
I was going to make KiteScheduler or something
Yeah
I have used guice before in the past
luckily guice helps cover up bukkit's design mistakes
also fixes my design mistakes
Any way I can build a provider
So- at startup I need to determine the NmsAdapter
provider for what?
I know its poor practice to do that within the Module
and I really wouldnt want to do that anyway
module shouldn't have any logic in it
not a fan of that
I'd just have some sort of nms determination logic, in a class, which provides the module with the correct implementation to bind
yeah I'm recreating my project in Spring lol
NmsManager has gone ๐
I'm hoping Spring won't weigh it down though
define weigh it down
make it not able to run on my 1 GB EC2 free tier any more without performance issues
though I'll probably need to get a new VPS anyway at some point
wish I could use Hetzner, if only Discord hadn't banned them
I do have a home server, but it's a dell optiplex and the internet here is terrible anyway
I get a maximum of 60-70 Mbps down and like 15-20 Mbps up
and my dell optiplex running CentOS 8 doesn't like my WiFi dongle
even though the driver is built-in to the damn kernel
I wanna get either a dedi or a decent VPS from like OVH or SYS but they're like 16+ and 18+
so I'd have to get my parents to send in a copy of one of their passports or driving licenses to get it
did you take a look at oneprovider?
oneprovider?
I linked it to you yesterday .-.
oh yeah that
lemme take another look
4GB DDR3 with 128 GB SSD and 1 Gpbs ain't too bad I suppose
but an Intel Atom is questionable
also, that costs $7.14
min specs? I just want something that'll perform well so I can basically do anything with it
aight what's your budget then
my friend has a ~30 eur dedi from oneprovider, 32gb ram, can't remember the other stuff, but it was a steal
around that
no bull shit like verification?
idk
or am I gonna have to ask my parents to scan one of their passports in
it's a decent dedi btw, not some piece of shit with like 32gb ddr2 or something
and I honestly don't know
A: The verification system was implemented in order to avoid fraudulent actions or illegal transactions. New customers paying with a credit card not supporting 3D secure, or an unverified PayPal account will be required to provide identification. Verified PayPal account will not be required to do this verification. Please note that verification may be required again if you decide to change your payment method.```
is your paypal verified?
is your paypal linked to a card or a bank account?
it's linked to my card which is a prepaid
link it to a bank account
and it was linked to my mothers and grandmothers debit cards
but my nana's card expires this month, and my mum's card shouldn't have even been on there in the first place so I took them off
also, hook it to a bank account?
yes
who's? because I don't have one
yeah I suppose I could ask my parents to sign me up for Barclays remote banking thingy
just go to your local bank, and sign up
Freakin' parents restriction 
you can't get a proper account until your 18 over in the UK
rip
I'm near to 18 btw
don't think there's a minimum age in aus
I could ask my parents to sign me up though
18 is the perfect age, cannot ask more
I've got 2 bank accounts rn, don't think you even need a parent to sign up for u
oof
I know there is one for 11-15 year olds
https://www.barclays.co.uk/current-accounts/childrens-bank-account/ that's what you get
Hold on a sec
Can the age 13+ get a credit card already?
I can't get a proper current account until I'm 16 piggy
Y'all hella young
I can get a debit card not a credit card thien, it might be different in other places
@hot hull shush boomer
so long you have the bsb & bank number you'll be fine
that's not how it works
I've had a debit card since I was 11 ๐ค
Aw man
gotta be 13 here to get a debit card
yeah I have a goHenry prepaid
What existing lugins use Guice?
who tf henry
it's 16 in wa aj
bruh
credit card is always 18+
what the fuck dyno
I can get a debit card if I wanted to
wait Dyno's in here?
I love debit card more than
Its kinda like how next year I have to register for a NSW lisence so i can get it one year earlier
so i can grab a friends adress and use that for my license
then I can get my actual one a year earlier
how do I know if my PayPal is verified anyway?
if you have a bank account or card linked, it's verified
I recommend you link the bank account just incase
that's why I said get one
k then hope the card is good enough
how do you have a card but not a bank account?
there is no possible way for anyone under 16 to obtain a bank account in the UK
Whats the card linked to?
Debit card doesn't need one
how do you have a card but not a bank account?
I have an account but not a proper one like one with a number and sort code
I'm surprised PayPal even accepted this one anyway
not ssd, but within your budget
k then one of those is good (go with the second)
you know what
I'm just gonna go on SYS and ask my parents to verify for me screw it
I don't know kotlin
yeah it's not great
it's getting rewritten using Spring
?
I didn't know you meant my role request lol
o
what did you think I meant?
we don't have any other sort of official review system in here
I kinda forgot about the role request tbh
there is no possible way for anyone under 16 to obtain a bank account in the UK
??? Lots of banks do kids accounts
yeah but not with acc numbers and sort codes like a proper bank afaik
also I'm gonna need a hand with this rewrite
that's what we're here for
as I said, structuring projects is not my forte
I don't have any fucking flow
usually works out spectacularly
if I "go with the flow" it'll end up like last time
well
get pencil and paper, and write it down
then post your planning, and we'll tell you why it's shit
Mine is a completely normal bank account
if I knew how to use Spring then yeah I'd be writing right now
online banking and everything
I've made this JDAService thing
spring is huge, might take a while before you can write clean code in it
mines a normal bank account but they made me set my parents as an admin
But from what I can see I can turn that off whenever I want online lol
santander >
Kali, how old i u
I got my full bank account when I was 12 iirc
student & saving, student linked to a card
how do Spring @Services work by the way?
are you asking for the bts explanation, or their use?
I want everything
but I learn best by seeing how something works in context and then reverse engineering that
the bts explanation is probably incredibly complicated, and I don't know their use, I've never used spring
look it up on baeldung
they write big fat spring courses
and lot's of other java related stuff, they're mainly known for spring through afaik
yeah as I said though, I learn best by first knowing how something is supposed to work, then seeing it working and reverse engineering that to figure out what it's doing
it's my way of avoiding things that require some element of creative thought, by copying others
okay so services are for things that do things
like a maths service that adds and subtracts
it's a thing that does things
also, is there any way to avoid IntelliJ complaining at me for naming a constant that isn't const (because it's a list) in full capital snake case?
or is it telling me that because that's not the convention for those types of things
how's https://bin.bardy.me/ukHwziTR.java so far by the way
it's what I came up with for the JDAService
any constants (eg private static final) should be upper snake case
they are aren't they?
I would make a bean for JDA
I made it lowercase at first, but then I remembered your preachings KM
isn't upper snake case UPPER_SNAKE_CASE?
Yes
yeah my constants are upper snake case then
also you said JDA should be a bean?
tf is a bean?
when you say bean it reminds me of a magic bean from Once Upon A Time lol
what kind of bean you on about?
https://en.wikipedia.org/wiki/JavaBeans this bean?
In computing based on the Java Platform, JavaBeans are classes that encapsulate many objects into a single object (the bean). They are serializable, have a zero-argument constructor, and allow access to properties using getter and setter methods. The name "Bean" was given to e...
It's a bean
i'm not sure what the actual definition is
but in spring a bean is something that can be injected
a class that encapsulates many objects in to a single object is what the definition of that is
@Bean
fun jda(): JDA = ourJDAInstance
``` then you can autowire `JDA` anywhere you need it
did you even look at the bin link I sent by the way? just curious
in the service class
can't I just annotate createJDA with @Bean then
or is this bean supposed to so something different
no beans of type String yeah
you probably want to use spring-config or something to have a config wrapper class
We're live!
config wrapper class?
wdym we're live glare?
you probably want to use
spring-configor something to have a config wrapper class
wdym? for what?
@Configuration
@ConfigurationProperties(prefix = "bot")
class DiscordConfig {
lateinit var token: String
lateinit var defaultGuildIcon: String
lateinit var welcomeMessage: String
val icon: Image by lazy {
Image.ofUrl(defaultGuildIcon).block()
}
}``` this is an example of something I used a while ago
spring will automatically generate an instance from application.properties / application.yml
eg my config had something like this in ```yaml
bot:
defaultGuildIcon: "http://localhost:8080/images/default_iconx128.png"
token: "nope"
welcomeMessage: "%s, welcome to %s! You're now the owner of this server!"
also what does it mean by "must be in canonical form"?
where?
@ConfigurationProperties
oh idk
Prefix must be in canonical form
i've never done that much spring stuff
it might want it to start with a capital letter or smth
okay I'm guessing that prefix isn't the bot's prefix lol
since having it as "bot" worked
also what does lateinit do?
ah okay
it's a nicer way of dealing with nullable stuff
it throws an exception if accessed before intialization, but can't be null
then how do I link this class to an actual config file?
and in what format do I store the config file?
afaik it reads application.properties|yml by default
so these values gotta be in application.properties then
yeah
you can configure a different file iirc
but no clue how lol
probably an annotation
also it says it has to be defined
which then it creates some additional configuration file in the META-INF folder
what has to be defined
if I put bot: in application.properties
then it's gotta be defined?
in the additional-spring-configuration-metadata.json file
then in that file it has a red bar telling me "Spring Boot Configuration Annotation Processor not configured"
so have I gotta depend on that then
i believe so
okay now I've depended on it and refreshed it still says it's not configured ๐ค
this is a weird framework
oh I'm supposed to use annotationProcessor
also, apparently kotlin.String isn't a class
according to this properties thingy
okay nvm about that
now how do I use this wrapper
inject it and get the property value
so just replace the token parameter with config: DiscordConfig and use config.token?
yep
I'd add prefix to the config too
it calls createJDA directly
as lateinit?
anyone up for some small ๐๐ป code review ๐๐ป?
for the prefix
@Bean
fun commandManager(config: BotConfig, jda: JDA): CommandManager {
return CommandManager(jda, config.prefix)
}
shouldn't these be constructor params also?
i don't think they can be because of how spring config works
ah okay
it needs a no-args constructor iirc
Does anybody know how viabackwards handle the new hex colors?
@Bean
fun commandManager(config: DiscordConfig, jda: JDA) = CommandManager(jda, config.prefix)
that should do right?
I'm kinda curious xd
Does anybody know how viabackwards handle the new hex colors?
no clue lol
is there even any 1.16 spigot?
No
they've gotta redo the entire colour system from scratch on Spigot
anyway, where were we KM
that function I sent should do right?
yes
okay what now?
well I might wanna make this bot actually work first lol
so I'm guessing I go to the application class for that
now how do I call these bean methods I just made?
you don't
Spring does
okay how do I do what you just said then
autowire an instance of JDA to wherever you need it
autowire an instance of JDA?
ok?
it was an example lol
my point is that you autowire things to where you need them
okay
to do whatever it is that you want to do
all I need to do is have Spring call that createJDA() method in the main function and it'll connect
which you can do by having a JDA instance autowired to somewhere
but to where?
I use command manager in the main function to declare commands
well, I don't yet, but I did in my old project
that should probably be in another class
but if you were to autowire a CommandManager to that class, the JDA would be created
autowire a CommandManager to my main class BardyBotApplication?
the one annotated with @SpringBootApplication
It should probably be elsewhere
in a @Component class CommandComponent for example
as should the registration of the CommandManager imo
what exactly am I gonna put in that component class?
you know there is no "imo" because I'm just gonna end up following what you say right
ยฏ_(ใ)_/ยฏ
because I 1. Don't know Spring and 2. Cannot structure projects
i'm not an expert so take everything I say with a reasonable amount of salt
so if I'm registering commands in this component class, am I gonna want to create methods to register commands?
bm isnt an expert? ๐ฎ
and also, how do I get Spring to call this method then?
or does it just call all methods in a component class anyway
nah it won't
at this point I imagine you'd autowire the CommandComponent into your main class and call the methods
this is the most fucking confusing shit I've ever seen in my life jesus christ
at this point I imagine you'd autowire the CommandComponent into your main class and call the methods
how does one do exactly that then?
it makes following the SRP much easier
yeah by being a pain in the ass
@SpringBootApplication
class MainClass {
@Autowired lateinit var commandComponent: CommandComponent
}``` should work
okay now that links to the commandManager() method in JDAService
now wtf do I do with that
call the methods?
and how exactly do I call these methods? in another method or in init?
yeah will do
init probably works fine
this is where my limited spring knowedge is starting to run out ๐ณ
IJ warns me about accessing a non-final property in a constructor
actually init is probably a bad idea
Whats guice for
DI
Orange guice is nice
So, when a user does a command, I want my bot to ask them some questions (like 5-7). for example What is your IGN I then want all the answers to be sent in an embed to a special channel
Whats the best way to go about this?
And I want to have an ID or something linked to said embed
So a staff member can click a reaction on it to reply to the user
have them ask a question, then have them enter their answer for text, or react with their answer for multiple choice aj3
actually init is probably a bad idea
what's a better way?
well yeah but whats the best way to handle it code wise?
Di?
dependency injection
Like should I have some form of data class that holds their answers or is that overkill
Dependency Injection
GIYF xD
it's automatic dependency injection
It's a lib for dependency injection
simple as
passes instances around
It.. injects.. dependencies
lol
if you wanna know about dependency injection, giyf
Aaaa
it's DI without all the manual constructor calling basically
anyway, where should I call these methods KM?
good question
using a CommandLineRunner would work but idk how good a practice that is
@heady birch
your expertise is required
for example is it worth having something like this?
data class Request(
val answerOne:String = "",
val answerTwo:String = ""
)```
we have summoned the spring god
lol
what do you want to do
I'm terrible at explaining as I have no idea
@prisma wave you do the explaining ๐
Step 1: Open Notepad
Step 2: type shutdown /s
Step 3: save as a batch file
Step 4: run file
ez
idfk how to explain it lmao
one can join a voice channel and share his screen if it may help
which is what one is currently doing
okay lemme try and explain this
so I've got one of these service classes with bean methods in them, and I've got this component class, and I wanna know what to do with these methods
okay that's terrible
@heady birch it'd be much easier if you saw it for yourself
basically that createJDA method has to be called to get a JDA instance to give to Matt's CommandManager so then you can register commands
How do state machines work?
done
@Service
public class CommandService {
@Autowired
public CommandService(final JDA jda) {
CommandManager....
}
}```
then the JDA gets auto wired
Java ew lol
Someone is suggesting I use them but I dont really understand it lol, Im tryna get my bot to ask the user a series of questions, then post the answers to the question in a channel at the end
So I get that each question would be a state (i think lol)
But I dont get how I would actually deal with that
in Kotlin that would have to be something like:
@Service
class CommandService @Autowired constructor(val jda: JDA) {
init {
TODO("Do something")
}
}
I think
then what do I do there?
just register commands?
@ocean quartz you really need to implement a method in to your framework that takes a list of commands and registers them all at once lol
how do I get an instance of commandManager?
@Autowired lateinit var commandManager: CommandManager?
but make sure you make a @Bean for it
so @Autowired constructor(val jda: JDA, val commandManager: CommandManager)
I did in the JDAService
also, IJ is still warning me about accessing a non-final property in the constructor
also also I've got nothing to call in that init yet since I don't have any commands so I'll just leave that for now
how do I get this code called in the main function?
The bean 'jda', defined in class path resource [dev/bombardy/bardybot/JDAService.class], could not be registered. A bean with that name has already been defined in file [/home/bombardygamer/IdeaProjects/BardyBot/build/classes/kotlin/main/dev/bombardy/bardybot/JDAService.class] and overriding is disabled. okay what the actual fuck
that's so dumb it's insane
I can yeah, the lib isn't finished yet
Though you can always:
listOf(
Command(),
Command2()
).forEach(commandManager::register)
true
@heady birch wtf does that message I sent mean
it tells me that the bean can't be made because it already exists in the compiled version????????/
Hm thats odd
Ive never seen that
maybe mvn clean or the gradle alternative to that
I just deleted the build folder
and it regenerated
still same issue
maybe I'm supposed to run bootRun
though that fails
Process 'command '/usr/lib/jvm/java-8-openjdk/bin/java'' finished with non-zero exit value 1
running BardyBotApplication (the Spring Boot app) has that error I mentioned earlier
anyone got any ideas whatsoever?
Any suggestions as to how I should handle permission checks if the user has the * permission? Cause right now it just fucks the entire system
If they have * player.hasPermission will always be true
What fucks your system? ;o
Let's say I have the test.test permission, having the wildcard perm somehow messes up all the priorities, (was tested without the wildcard perm and it worked perfectly)
I have found a way to counter that
Anyone wanna point out some issues in this class?
https://github.com/ipsk/TriumphPets/blob/development/version1_15/src/main/kotlin/me/mattstudios/triumphpets/pet/v1_15/goals/PickUpItemsGoal.kt
hey @ocean quartz what's @Requirement for and where is it used in your JDA framework?
and also, what's @Delete for
commandManager.registerRequirement("#admin") {
val admin = jda.getRoleById(config[Setting.ADMIN]) ?: return@registerRequirement false
return@registerRequirement it.roles.any{ role -> role.position >= admin.position}
}```
` @Requirement("#admin")`
So not everyone can use the command, only those that meet the requirement, it's used on the functions
And delete is for auto deleting the message once the command is sent
Same thing as others, it's named value because java and annotations
Basically it requires a boolean
boolean of what? if it's a requirement or not?
I just made a request free that would benefit alot of people :D
you wanna make an IDE?
for free?
no, i want someone else to make a IDE site..
for free?
yes
yeah nobody has the time or motivation for that
especially motivation
well yeah but it dosent benefit me as much as others
why can't you just use vscode
I can.
then do that
But my pc is bad. and laggy.
a different custom-written program won't fix that
a website**
a website also won't fix that
well yes but the site wouldnt lag as much as VS
not true
It would
vscode is web based anyway
If your pc is trash, browser will shit itself anyways
And?
it wont make a blind bit of difference which browser you use
Desktop applications beform better than websites
Kid vscode online didnt work for me
Websites are a bunch of interpreted javascript
you guys know where i can report people
Desktop applications are compiled or JIT
Counts as scamming yes
Oh cool someone already wants to do it :D
Anyhow kinda meh idea since
Desktop applications beform better than websites
to be fair
vscode runs on electron
which is just chromium without the frontend
so in theory the difference will be very little if not none
first one
ok
And make sure to provide sufficient evidence
some desktop apps do perform worse than websites
Most
desktop apps perform better in better hardware
the same goes for browsers
when websites perform pretty much the same always
a browser is a desktop app too
yeah ik
and this is not true
when websites perform pretty much the same always
but Websites perform better
because they're generally not intensive
If your computer is from like 1995 then ofc websites will suck
Desktop apps are also laggier on worse hardware
moving an app that already runs on chromium into a browser will do pretty much fuck all
VSC dosent run on chromium
electron is a shitty coded version of a browser
Bruh moment
VSC dosent run on electron and even if it did they implemented it poorly then
https://www.electronjs.org/ are you sure about that
right there on the front page
you appear to have gone silent
Update your PC ๐
I find the vsc performance fine
Why not use n++ or sublime if it's really that bad
vsc is definitely not slow
@topaz bay not for you but for me
Your fault
My fault that vsc isn't optimised on performance for my computer hardware?
You kinda can't complain about your pc being shit, vsc runs smooth af on mine
Sx nah, cpu limits it to 3gb
cpu limits to 3?
I cant overglock
32bit Yugi
overclocking a 2nd gen i5 
Still sus about it, but oh well
32bit
Sx, check which version of it you're looking at
Most likely the OS
32 bit allows 4gb
i have had bad experiences with electron
Discord?
Theres only 1 on intel's website
I know
Bootleg cpu?
hes got some dodgy cpu that limits it
including discord
Which is sus, but 64bit OS doesn't work at all
What is "sus"
suss
There is no way in hell you have a core series processor that limits to 3 gigs
That other gig has to be being used my the IGPU
ok but point is he still got 32bit
Poor guy cant use doubles ๐ฆ
@ocean quartz accept my merge request ๐
And that is not a 32 bit cpu
ive been trying to say this sx ๐ฆ
ive given up, and came to the conclusion that hes got a bootleg cpu
lol
wait did I just see someone say they're running a 64-bit OS with 4GB RAM maximum?
How?
How would I fuck up when an IT guy tried to install 64bit and wasn't able to?
HAHAHAHA
you mean these "desktop support" idiots you find at your average school or university who haven't got even the slightest clue about pretty much anything beyond the solution of turn it off and turn it back on again?

ngl can't respond to that cause gonna get beaned
no wonder you have a 4:3
But you can think what you want ๐
but is it one of those people?
or is it someone who actually has a clue about what they're doing
what happened here?
if it's one of those people I'm not surprised that they fucked it up
idk
how do you guys like my new README for Matt's JDA framework by the way: https://github.com/BomBardyGamer/MattFrameworkJDA
pretty good
anything else you think I should include or anything you think I should change?
anyway, back to work on BardyBot
still gotta figure out what:
The bean 'jda', defined in class path resource [dev/bombardy/bardybot/JDAService.class], could not be registered. A bean with that name has already been defined in file [/home/bombardygamer/IdeaProjects/BardyBot/build/classes/kotlin/main/dev/bombardy/bardybot/JDAService.class] and overriding is disabled.
means
or should I say, why tf it's occuring
@topaz bay is something like that at all your fortรฉ?
You bean
lol
no one seems to be able to figure out why tf it's occuring
I've tried clean building it as well
You have something called application.yml?
if I try to run gradle bootRun it says: Process 'command '/usr/lib/jvm/java-8-openjdk/bin/java'' finished with non-zero exit value 1
You have something called
application.yml?
I haveapplication.propertiesyes
Try adding spring.main.allow-bean-definition-overriding: true to it
That happened after adding that?
yep
Hey BM, is PDM ready for beta? (Feel free to tag me when you respond)
Try changing it to spring.main.allow-bean-definition-overriding = true
that's what it is since IJ said that was the proper way to do it
spring.main.allow-bean-definition-overriding= true
ah
I think I'm supposed to run gradle bootRun though
@frail glade I think so. The plugin hasn't been approved into the gradle repo yet so you'd need to use your local repo, but from my testing everything seems to be working fine
which actually comes back with that error funnily enough
The code is a mess though lol
Alrighty. Let me know when it gets approved.
@prisma wave How exactly are you using files from the bukkit plugin in the gradle plugin?
Because it's not a bukkit plugin
It's very loosely coupled with bukkit but 99% of the code is platform agnostic
@heady birch any idea what https://bin.bardy.me/VVrrUnMb.rb means?
ah okay think I figured out my issue
I had @Service("jda") and then a jda() method
I don't think that's allowed
oh now I've got the token is invalid issue
might help if I give it my bot token
@jovial warren dont touch me
what?
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jda' defined in class path resource [dev/bombardy/bardybot/JDAService.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.dv8tion.jda.api.JDA]: Factory method 'jda' threw exception; nested exception is javax.security.auth.login.LoginException: The provided token is invalid! hmm...
oh yeah that lol
yeah I am now
apparently the token I've provided is invalid
even though I've given it my token in application.properties
bot.token="CENSORED"
try printing it
okay
I tried converting the bean method to a body block and printing before the return but nothing came back
that's definitely not where I was supposed to do it is it
let's try doing it in CommandService
nope
didn't get there
where can I put this println() @heady birch?
or should I say, where should I put it?
@Service
class JDAService {
private val GATEWAY_INTENTS = listOf(
GatewayIntent.GUILD_MESSAGES,
GatewayIntent.GUILD_VOICE_STATES)
private val DISABLED_FLAGS = listOf(
CacheFlag.ACTIVITY,
CacheFlag.CLIENT_STATUS,
CacheFlag.EMOTE)
@Bean
fun jda(config: DiscordConfig) = JDABuilder.create(config.token, GATEWAY_INTENTS)
.setActivity(Activity.playing("prevarinite.com"))
.disableCache(DISABLED_FLAGS)
.build()
@Bean
fun commandManager(jda: JDA) = CommandManager(jda)
}
that's what I got in JDAService
@topaz bay there is no bukkit plugin
it's just a library that you shade
- a gradle plugin
The only standalone bukkit plugin is the example module
You have references to the bukkit api in that module
And you depend on that module from the gradle plugin
what's this?
bean
The only reference is to make a nicer constructor for PluginDependencyManager
Which is why it's 99% decoupled

and that constructor doesn't have to be used
You also reference the bukkit class in spigotrepository...
send us a link please
idk, just really seems like the gradle plugin should have absolutely no idea about spigot
Oh yeah good point
I could've made a common module, but since neither of those classes are used in the gradle plugin it should be fine
theyre compiled into it though...
They have no reason to be
Nor should like... 90% of this tbh?
Doesn't it just like... read dependencies, and put them into a json file
It doesnt make sense for the gradle plugin to have any of this
From my testing, if you don't specify a repository it has to query them all at runtime, which adds quite a bit to startup time
I might make it an option
But from what I've found it's worth it
Yeah I'll make it an option in the gradle plugin
ยฏ_(ใ)_/ยฏ
Let Piggy do Piggy things
Bardy I still can't get access to my CE using puTTy or BitVise, this is actually driving me nuts
what's the error
Differs
Sometimes, key rejected, sometimes some other thing about no authentication method
@frail glade ๐
that's pretty cool
Hmm? Oh, the change of the icons from the side to top and bottom?
Scrolling through items ;p
How is that different than the pagination?
Idk Niall I can try
Basically Glare, pagination goes 1 page size at a time, the scrolling will be row per row change
Niall, I was plugging your project yesterday to a bunch of people. I expect to be compensated when you get all these new buyers.
That's pretty cool, Matt.
Cool!
Yeah, Lewizzz suggested it so thought i'd give it a try
Good work.
Where did you tell them about it Glare?