Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
Send file link as well on deleted system
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver-makes-code committed Jun 5, 2023
1 parent c903be0 commit 8c4c78f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ object MiscCommands : CommandRegistrar {
null,
NamedFile("system.json", ChannelProvider { export.byteInputStream().toByteReadChannel() })
)
message.channel.createMessage(message.attachments.elementAt(0).url)
message.channel.createMessage(message.attachments.first().url)
ctx.respondSuccess("Check your DMs~")
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -704,10 +704,11 @@ object SystemCommands : CommandRegistrar {
"The data will be lost forever (A long time!)",
yes = "Delete system" to {
val export = Exporter.export(ctx.getUser()!!.id.value)
ctx.respondFiles(
val message = ctx.respondFiles(
null,
NamedFile("system.json", ChannelProvider { export.byteInputStream().toByteReadChannel() })
)
ctx.getChannel(true).createMessage(message.attachments.first().url)
database.dropSystem(ctx.getUser()!!)
content = "System deleted."
},
Expand Down

0 comments on commit 8c4c78f

Please sign in to comment.