Skip to content

Commit

Permalink
ウーォ
Browse files Browse the repository at this point in the history
  • Loading branch information
kawaemon committed Nov 20, 2024
1 parent 504c9f4 commit 2289dce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/bot/meigen/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use {
crate::bot::{parse_command, ui, BotService, Context, IsUpdated, Message},
crate::bot::{
parse_command, ui, BotService, Context, IsUpdated, Message, KAWAEMON_DISCORD_USER_ID,
},
anyhow::{Context as _, Result},
async_trait::async_trait,
model::{Meigen, MeigenId},
Expand Down Expand Up @@ -220,7 +222,6 @@ impl<D: MeigenDatabase> MeigenBot<D> {
}

async fn delete(&self, caller: u64, id: MeigenId) -> Result<String> {
const KAWAEMON_DISCORD_USER_ID: u64 = 391857452360007680;
if caller != KAWAEMON_DISCORD_USER_ID {
return Ok("名言削除はかわえもんにしか出来ません".into());
}
Expand Down
2 changes: 2 additions & 0 deletions src/bot/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ use {
std::{future::Future, pin::Pin},
};

const KAWAEMON_DISCORD_USER_ID: u64 = 391857452360007680;

/// 変更が生じた場合 true
pub type IsUpdated = bool;

Expand Down
3 changes: 1 addition & 2 deletions src/bot/uo/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::bot::{parse_command, ui, BotService, Context, Message};
use crate::bot::{parse_command, ui, BotService, Context, Message, KAWAEMON_DISCORD_USER_ID};
use anyhow::{Context as _, Result};
use async_trait::async_trait;
use tokio::sync::Mutex;
Expand Down Expand Up @@ -68,7 +68,6 @@ impl BotService for UoBot {
format!("```{UO}確率: {prob}%```")
}
Reroll => {
const KAWAEMON_DISCORD_USER_ID: u64 = 391857452360007680;
if msg.author().id() == KAWAEMON_DISCORD_USER_ID {
self.reroll().await;
"振り直しました".to_owned()
Expand Down

0 comments on commit 2289dce

Please sign in to comment.