chore: update copyright
All checks were successful
Build Gradle project / build-gradle-project (push) Successful in 2m55s
All checks were successful
Build Gradle project / build-gradle-project (push) Successful in 2m55s
Signed-off-by: moonleay <contact@moonleay.net>
This commit is contained in:
parent
ab7016cdb3
commit
c65e4031d9
45 changed files with 66 additions and 52 deletions
|
@ -74,6 +74,7 @@ object Bot {
|
|||
exitProcess(3)
|
||||
}
|
||||
|
||||
// Check if there are api credentials
|
||||
if (CredentialManager.apiDomain == "empty" || CredentialManager.apiToken == "empty") {
|
||||
Logger.out("The config does not contain the whole API credentials.")
|
||||
exitProcess(3)
|
||||
|
@ -187,18 +188,22 @@ object Bot {
|
|||
// Load news
|
||||
NewsManager.load()
|
||||
if(NewsManager.shouldPost == "yes"){
|
||||
val contactedOwners = mutableListOf<ULong>()
|
||||
bot.kordRef.guilds.collect {
|
||||
val owner = it.owner.asUser()
|
||||
Logger.out("Sent News to ${owner.username} from ${it.name}")
|
||||
owner.dm {
|
||||
this.embed {
|
||||
this.title = NewsManager.title
|
||||
this.description = NewsManager.news
|
||||
this.footer {
|
||||
this.icon = bot.kordRef.getSelf().avatar?.cdnUrl?.toUrl()
|
||||
this.text = MessageUtil.getFooter()
|
||||
if (!contactedOwners.contains(owner.id.value)) {
|
||||
Logger.out("Sent News to ${owner.username} from ${it.name}")
|
||||
owner.dm {
|
||||
this.embed {
|
||||
this.title = NewsManager.title
|
||||
this.description = NewsManager.news
|
||||
this.footer {
|
||||
this.icon = bot.kordRef.getSelf().avatar?.cdnUrl?.toUrl()
|
||||
this.text = MessageUtil.getFooter()
|
||||
}
|
||||
}
|
||||
}
|
||||
contactedOwners.add(owner.id.value)
|
||||
}
|
||||
}
|
||||
NewsManager.shouldPost = "no"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -52,6 +52,11 @@ object MessageUtil {
|
|||
val ebb = EmbedBuilder()
|
||||
ebb.color = e.color
|
||||
ebb.title = e.title
|
||||
ebb.author {
|
||||
this.icon = e.author?.url
|
||||
this.name = e.author?.name.toString()
|
||||
this.url = e.author?.url
|
||||
}
|
||||
e.fields.forEach {
|
||||
val fb = EmbedBuilder.Field()
|
||||
fb.name = it.name
|
||||
|
@ -59,6 +64,10 @@ object MessageUtil {
|
|||
fb.inline = it.inline
|
||||
ebb.fields.add(fb)
|
||||
}
|
||||
ebb.footer {
|
||||
this.icon = e.footer?.icon
|
||||
this.text = e.footer?.text.toString()
|
||||
}
|
||||
ebb.description = e.description
|
||||
return ebb
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* lilJudd
|
||||
* Copyright (C) 2023 moonleay
|
||||
* Copyright (C) 2024 moonleay
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
Loading…
Reference in a new issue