-
Notifications
You must be signed in to change notification settings - Fork 1
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
c09df4d
commit fd62ab9
Showing
4 changed files
with
66 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- Add migration script here | ||
INSERT INTO global_kills (feature) VALUES ('commands.privacy'); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
use serenity::all::{CommandInteraction, CreateCommand, CreateEmbed}; | ||
|
||
use crate::models::{ | ||
command::{Command, CommandContext, CommandContextReply}, | ||
handler::Handler, | ||
response::{Response, ResponseResult}, | ||
}; | ||
|
||
pub struct PrivacyCommand; | ||
|
||
#[async_trait::async_trait] | ||
impl Command for PrivacyCommand { | ||
fn name(&self) -> &'static str { | ||
"privacy" | ||
} | ||
|
||
fn register(&self) -> CreateCommand { | ||
CreateCommand::new("privacy").description("Get Reaper's Privacy Policy") | ||
} | ||
|
||
async fn router( | ||
&self, | ||
_handler: &Handler, | ||
ctx: &CommandContext, | ||
cmd: &CommandInteraction, | ||
) -> ResponseResult { | ||
ctx.reply( | ||
cmd, | ||
Response::new() | ||
.embed( | ||
CreateEmbed::new() | ||
.title("Privacy Policy") | ||
.description( | ||
format!("You can view Reaper's Privacy Policy [here](https://github.com/GenericNerd/reaper/blob/development/PRIVACY.md).") | ||
) | ||
.color(0xeb966d) | ||
).ephemeral(true) | ||
).await | ||
} | ||
} |
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