mirror of
https://github.com/ethanrusz/echbot.git
synced 2024-11-22 04:07:46 -05:00
commit
0fabaa7ca4
3 changed files with 24 additions and 21 deletions
|
@ -7,7 +7,7 @@ use std::{
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Basically a ping command
|
/// Basically a ping command
|
||||||
#[poise::command(slash_command)]
|
#[poise::command(slash_command, prefix_command)]
|
||||||
pub(crate) async fn slur(ctx: Context<'_>) -> Result<(), Error> {
|
pub(crate) async fn slur(ctx: Context<'_>) -> Result<(), Error> {
|
||||||
let file = File::open("quotes.txt").unwrap_or_else(|_e| panic!("Quote file missing.")); // Open the quotes file
|
let file = File::open("quotes.txt").unwrap_or_else(|_e| panic!("Quote file missing.")); // Open the quotes file
|
||||||
let file = BufReader::new(file); // Read the quotes file
|
let file = BufReader::new(file); // Read the quotes file
|
||||||
|
|
|
@ -64,8 +64,8 @@ pub(crate) async fn team(
|
||||||
.color(serenity::Colour::DARK_GREEN)
|
.color(serenity::Colour::DARK_GREEN)
|
||||||
})
|
})
|
||||||
.components(|c| {
|
.components(|c| {
|
||||||
c // Create an action row with button
|
c.create_action_row(|a| {
|
||||||
.create_action_row(|a| {
|
// Create an action row with button
|
||||||
a.create_button(
|
a.create_button(
|
||||||
|b| {
|
|b| {
|
||||||
b.style(serenity::ButtonStyle::Primary)
|
b.style(serenity::ButtonStyle::Primary)
|
||||||
|
@ -101,8 +101,8 @@ pub(crate) async fn team(
|
||||||
.color(serenity::Colour::DARK_GREEN)
|
.color(serenity::Colour::DARK_GREEN)
|
||||||
})
|
})
|
||||||
.components(|c| {
|
.components(|c| {
|
||||||
c // Create an action row with button
|
c.create_action_row(|a| {
|
||||||
.create_action_row(|a| {
|
// Create an action row with button
|
||||||
a.create_button(
|
a.create_button(
|
||||||
|b| {
|
|b| {
|
||||||
b
|
b
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
mod commands;
|
|
||||||
|
|
||||||
use poise::serenity_prelude as serenity;
|
use poise::serenity_prelude as serenity;
|
||||||
|
|
||||||
|
mod commands;
|
||||||
|
|
||||||
struct Data {}
|
struct Data {}
|
||||||
|
|
||||||
type Error = Box<dyn std::error::Error + Send + Sync>;
|
type Error = Box<dyn std::error::Error + Send + Sync>;
|
||||||
|
@ -29,6 +29,9 @@ async fn main() {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
.await?; // Update slash commands in GID
|
.await?; // Update slash commands in GID
|
||||||
|
|
||||||
|
ctx.set_activity(serenity::Activity::playing("SMITE")).await;
|
||||||
|
|
||||||
Ok(Data {})
|
Ok(Data {})
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue