Add basic moderator commands
This commit is contained in:
@@ -64,7 +64,7 @@ where
|
||||
fn build(&self, id: Option<String>) -> TwilightComponent {
|
||||
TwilightComponent::Button(TwilightButton {
|
||||
custom_id: id,
|
||||
disabled: false,
|
||||
disabled: self.disabled(),
|
||||
emoji: None,
|
||||
label: self.label().map(|i| i.to_string()),
|
||||
style: if self.url().is_none() {
|
||||
@@ -95,16 +95,23 @@ where
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
fn style(&self) -> ButtonStyle {
|
||||
ButtonStyle::Secondary
|
||||
}
|
||||
fn label(&self) -> Option<&'static str> {
|
||||
|
||||
fn label(&self) -> Option<String> {
|
||||
None
|
||||
}
|
||||
fn url(&self) -> Option<&'static str> {
|
||||
|
||||
fn url(&self) -> Option<String> {
|
||||
None
|
||||
}
|
||||
|
||||
fn disabled(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
async fn on_press(&self, ctx: InteractionContext<S, E>) -> Result<(), InteractionError> {
|
||||
ctx.defer().await
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user