forked from DiscordBots/lilJudd
chore: update copyright
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,8 +188,10 @@ object Bot {
|
|||
// Load news
|
||||
NewsManager.load()
|
||||
if(NewsManager.shouldPost == "yes"){
|
||||
val contactedOwners = mutableListOf<ULong>()
|
||||
bot.kordRef.guilds.collect {
|
||||
val owner = it.owner.asUser()
|
||||
if (!contactedOwners.contains(owner.id.value)) {
|
||||
Logger.out("Sent News to ${owner.username} from ${it.name}")
|
||||
owner.dm {
|
||||
this.embed {
|
||||
|
@ -200,6 +203,8 @@ object Bot {
|
|||
}
|
||||
}
|
||||
}
|
||||
contactedOwners.add(owner.id.value)
|
||||
}
|
||||
}
|
||||
NewsManager.shouldPost = "no"
|
||||
NewsManager.update()
|
||||
|
|
|
@ -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