mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 11:36:24 +01:00
Adds a discord bot command version of show-server-revision (#66338)
* Adds a discord bot command version of show-server-revision This is to replace `!tgs revision` with something less lame. * Update chat_commands.dm * Update chat_commands.dm * Update chat_commands.dm * Update chat_commands.dm * remove unneeded sanic
This commit is contained in:
committed by
GitHub
parent
e99aaa38b5
commit
9dfbc51d8d
@@ -20,6 +20,32 @@
|
||||
var/server = CONFIG_GET(string/server)
|
||||
return "[GLOB.round_id ? "Round #[GLOB.round_id]: " : ""][GLOB.clients.len] players on [SSmapping.config.map_name]; Round [SSticker.HasRoundStarted() ? (SSticker.IsRoundInProgress() ? "Active" : "Finishing") : "Starting"] -- [server ? server : "[world.internet_address]:[world.port]"]"
|
||||
|
||||
/datum/tgs_chat_command/gameversion
|
||||
name = "gameversion"
|
||||
help_text = "Gets the version details from the show-server-revision verb, basically"
|
||||
|
||||
/datum/tgs_chat_command/gameversion/Run(datum/tgs_chat_user/sender, params)
|
||||
var/list/msg = list("")
|
||||
msg += "BYOND Server Version: [world.byond_version].[world.byond_build] (Compiled with: [DM_VERSION].[DM_BUILD])\n"
|
||||
|
||||
if (!GLOB.revdata)
|
||||
msg += "No revision information found."
|
||||
else
|
||||
msg += "Revision [copytext_char(GLOB.revdata.commit, 1, 9)]"
|
||||
if (GLOB.revdata.date)
|
||||
msg += " compiled on '[GLOB.revdata.date]'"
|
||||
|
||||
if(GLOB.revdata.originmastercommit)
|
||||
msg += ", from origin commit: <[CONFIG_GET(string/githuburl)]/commit/[GLOB.revdata.originmastercommit]>"
|
||||
|
||||
if(GLOB.revdata.testmerge.len)
|
||||
msg += "\n"
|
||||
for(var/datum/tgs_revision_information/test_merge/PR as anything in GLOB.revdata.testmerge)
|
||||
msg += "PR #[PR.number] at [copytext_char(PR.head_commit, 1, 9)] [PR.title].\n"
|
||||
if (PR.url)
|
||||
msg += "<[PR.url]>\n"
|
||||
return msg.Join("")
|
||||
|
||||
/datum/tgs_chat_command/ahelp
|
||||
name = "ahelp"
|
||||
help_text = "<ckey|ticket #> <message|ticket <close|resolve|icissue|reject|reopen <ticket #>|list>>"
|
||||
|
||||
Reference in New Issue
Block a user