-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
280fb69
commit 7bae9a2
Showing
18 changed files
with
690 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
app/src/main/kotlin/ca/fireball1725/lcs/discordbot/commands/EditProfile.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Created for the Lost Crafters SMP (https://www.lostcrafterssmp.com) | ||
* Licensed under the GNU Affero General Public License v3.0 | ||
* See LICENSE.txt for full license information | ||
*/ | ||
|
||
package ca.fireball1725.lcs.discordbot.commands | ||
|
||
import ca.fireball1725.lcs.discordbot.getDatabase | ||
|
||
|
||
class EditProfile { | ||
fun getEditProfileLink(discordId:ULong): String { | ||
val member = getDatabase().getMemberFromDiscordId(discordId) | ||
|
||
return if (member != null) { | ||
val token = getDatabase().createSessionToken(member.member_id) | ||
|
||
val url = "https://www.lostcrafterssmp.com/login/${token}" | ||
|
||
var resultString = "" | ||
resultString += "# Edit Profile\n" | ||
resultString += "Click [Here](<$url>) to edit your profile\n" | ||
resultString | ||
} else { | ||
"Error" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
app/src/main/kotlin/ca/fireball1725/lcs/discordbot/data/database/Member.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/* | ||
* Created for the Lost Crafters SMP (https://www.lostcrafterssmp.com) | ||
* Licensed under the GNU Affero General Public License v3.0 | ||
* See LICENSE.txt for full license information | ||
*/ | ||
|
||
package ca.fireball1725.lcs.discordbot.data.database | ||
|
||
import java.util.UUID | ||
|
||
data class Member( | ||
val member_id: UUID, | ||
val display_username: String, | ||
val discord_id: Long, | ||
val pronouns: String?, | ||
val country: String?, | ||
val description: String?, | ||
val show_on_website: Boolean, | ||
) |
25 changes: 25 additions & 0 deletions
25
app/src/main/kotlin/ca/fireball1725/lcs/discordbot/data/database/Server.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* Created for the Lost Crafters SMP (https://www.lostcrafterssmp.com) | ||
* Licensed under the GNU Affero General Public License v3.0 | ||
* See LICENSE.txt for full license information | ||
*/ | ||
|
||
package ca.fireball1725.lcs.discordbot.data.database | ||
|
||
import java.util.UUID | ||
|
||
data class Server( | ||
val server_id: UUID, | ||
val pterodactyl_id: UUID, | ||
val server_name: String, | ||
val description: String, | ||
val gamemode: String?, | ||
val pack_url: String?, | ||
val live_map_url: String?, | ||
val server_live: Boolean, | ||
val server_started: String?, | ||
val server_finished: String?, | ||
val game_name: String?, | ||
val game_url: String?, | ||
val game_icon: String?, | ||
) |
54 changes: 54 additions & 0 deletions
54
app/src/main/kotlin/ca/fireball1725/lcs/discordbot/data/pterodactyl/GetDirectoryList.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Created for the Lost Crafters SMP (https://www.lostcrafterssmp.com) | ||
* Licensed under the GNU Affero General Public License v3.0 | ||
* See LICENSE.txt for full license information | ||
*/ | ||
|
||
package ca.fireball1725.lcs.discordbot.data.pterodactyl | ||
|
||
import com.google.gson.annotations.SerializedName | ||
|
||
data class GetDirectoryList ( | ||
@SerializedName("object") | ||
var obj: String? = null, | ||
|
||
@SerializedName("data") | ||
var data: ArrayList<GetDirectoryListData> = arrayListOf(), | ||
) | ||
|
||
data class GetDirectoryListData ( | ||
@SerializedName("object") | ||
var obj: String? = null, | ||
|
||
@SerializedName("attributes") | ||
var attributes: GetWorldBackupDataAttributes? = GetWorldBackupDataAttributes() | ||
) | ||
|
||
data class GetDirectoryListAttributes ( | ||
@SerializedName("name") | ||
var name: String? = null, | ||
|
||
@SerializedName("mode") | ||
var mode: String? = null, | ||
|
||
@SerializedName("size") | ||
var size: Long? = null, | ||
|
||
@SerializedName("is_file") | ||
var isFile: Boolean? = null, | ||
|
||
@SerializedName("is_symlink") | ||
var isSymLink: Boolean? = null, | ||
|
||
@SerializedName("is_editable") | ||
var isEditable: Boolean? = null, | ||
|
||
@SerializedName("mimetype") | ||
var mimetype: String? = null, | ||
|
||
@SerializedName("created_at") | ||
var createdAt: String? = null, | ||
|
||
@SerializedName("modified_at") | ||
var modifiedAt: String? = null, | ||
) |
Oops, something went wrong.