Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discord AHelp Reply System #2315

Merged
merged 24 commits into from
Jan 4, 2025

Conversation

sleepyyapril
Copy link
Contributor

@sleepyyapril sleepyyapril commented Nov 29, 2024

About the PR

This ports new-frontiers-14/frontier-station-14#2283 which allows admins to respond to AHelps while on discord.

Why / Balance

Not needing to be in-game to handle ahelps is a benefit for all admins.

Technical details

This PR requires:

  1. Something that can handle the discord side, see original PR for details. You can also use my RedBot cog, if Delta-v uses RedBot.
  2. A set admin.api_token CVar value to use on the discord side.
  3. CVar status.enabled being true

This PR changes the way the BwoinkSystem works to allow for custom URLs instead of just an id and a token for webhooks, as well as adding an admin API HTTP POST method under /admin/actions/send_bwoink.

Media

image
image

Requirements

  • I have tested all added content and changes.
  • I have added media to this PR or it does not require an ingame showcase.

Breaking changes

None

Changelog

🆑
ADMIN:

  • add: Added the ability to reply to AHelps from discord.

Myzumi and others added 2 commits November 28, 2024 21:51
* First part of Remote Bwoinking

* This should technically work

* No Actoring

* Fixes Guid not sending over

* Making it work for the final.

* Fixes for api

* Moar Commants!

Just more Comments to mark Frontier changes.

* comment

* wops

* Fixes Naming Rules

* I Should also fix the naming in the actually code...

* Testing some new code

* Naming rule and dependency fix (hopefully)

* Serverside Webhook update on external sent ahelp messages

* Still get data from custom URL's, even if it dosent match a discord webhook

* Apply suggestions from code review (Part 1)

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>

* Apply suggestions from code review (Part 2)

* Bwoink system suggsetions

* missing BwoinkSystem changes

* Change access on BwoinkSystem._messageQueues

* Updates the Regex to support other Discord Clients (beta, alpha)

* Merge Fixes

* BwoinkSystem: explicitly match "canary."/"ptb."

---------

Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com>
Co-authored-by: Whatstone <whatston3@gmail.com>
@sleepyyapril sleepyyapril requested a review from a team as a code owner November 29, 2024 02:03
@github-actions github-actions bot added S: Needs Review Changes: C# Changes any cs files size/M 64-255 lines and removed S: Needs Review labels Nov 29, 2024
@sleepyyapril sleepyyapril changed the title Discord reply system Discord AHelp Reply System Nov 29, 2024
@github-actions github-actions bot added size/L 256-1023 lines and removed size/M 64-255 lines labels Nov 30, 2024
@sleepyyapril
Copy link
Contributor Author

Proof of everything working added.

@sleepyyapril
Copy link
Contributor Author

Errors are unrelated, too.

@Colin-Tel
Copy link
Contributor

Looks awesome!

Copy link
Member

@deltanedas deltanedas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theres more but overall theres a stupid amount of changes that it makes any upstream changes to this system a nightmare to manage, should be done upstream

Content.Server/Administration/ServerApi.cs Outdated Show resolved Hide resolved
Content.Server/Administration/ServerApi.cs Outdated Show resolved Hide resolved
Content.Server/Administration/ServerApi.cs Outdated Show resolved Hide resolved
Content.Server/Administration/Systems/BwoinkSystem.cs Outdated Show resolved Hide resolved
Content.Server/Administration/Systems/BwoinkSystem.cs Outdated Show resolved Hide resolved
Content.Server/Administration/Systems/BwoinkSystem.cs Outdated Show resolved Hide resolved
Content.Server/Administration/Systems/BwoinkSystem.cs Outdated Show resolved Hide resolved
@sleepyyapril
Copy link
Contributor Author

sleepyyapril commented Dec 5, 2024

theres more but overall theres a stupid amount of changes that it makes any upstream changes to this system a nightmare to manage, should be done upstream

Incapable of doing upstream, majority of this is AGPL from frontier.

@sleepyyapril
Copy link
Contributor Author

@deltanedas @MilonPL i fixed :D

Content.Shared/CCVar/CCVars.Admin.cs Outdated Show resolved Hide resolved
Content.Server/Administration/Systems/BwoinkSystem.cs Outdated Show resolved Hide resolved
Content.Server/Administration/Systems/BwoinkSystem.cs Outdated Show resolved Hide resolved
Content.Server/Administration/Systems/BwoinkSystem.cs Outdated Show resolved Hide resolved
Content.Server/Administration/Systems/BwoinkSystem.cs Outdated Show resolved Hide resolved
Content.Server/Administration/Systems/BwoinkSystem.cs Outdated Show resolved Hide resolved
Content.Server/Administration/Systems/BwoinkSystem.cs Outdated Show resolved Hide resolved
Content.Server/Administration/ServerApi.cs Show resolved Hide resolved
Content.Server/Administration/ServerApi.cs Show resolved Hide resolved
@deltanedas deltanedas enabled auto-merge (squash) January 4, 2025 00:29
@deltanedas deltanedas merged commit f4efc57 into DeltaV-Station:master Jan 4, 2025
14 checks passed
@sleepyyapril sleepyyapril deleted the discord-reply-system branch January 4, 2025 00:49
@sleepyyapril sleepyyapril restored the discord-reply-system branch January 5, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Holy Shit S: Needs Review size/L 256-1023 lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants