mirror of
https://github.com/Noratrieb/widetom.git
synced 2026-01-14 17:05:03 +01:00
small changes
This commit is contained in:
parent
0782ba6c87
commit
271f44a9fa
2 changed files with 5 additions and 2 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
# if a message contains the keyword on the left, w i d e t o m will react with the emote on the right
|
||||||
|
# the emote name has to be the keyword
|
||||||
emotes = [
|
emotes = [
|
||||||
["conny", 838137360667508786],
|
["conny", 838137360667508786],
|
||||||
["rene", 832636011917606912],
|
["rene", 832636011917606912],
|
||||||
|
|
@ -5,4 +7,5 @@ emotes = [
|
||||||
["nick", 816429590687776839],
|
["nick", 816429590687776839],
|
||||||
["nils", 816429379654516796],
|
["nils", 816429379654516796],
|
||||||
["tom", 811324632082415626],
|
["tom", 811324632082415626],
|
||||||
|
["thomas", 803607136000802827],
|
||||||
]
|
]
|
||||||
|
|
@ -29,12 +29,12 @@ lazy_static! {
|
||||||
|
|
||||||
#[hook]
|
#[hook]
|
||||||
pub async fn normal_message(ctx: &Context, msg: &Message) {
|
pub async fn normal_message(ctx: &Context, msg: &Message) {
|
||||||
if msg.content == "tom" {
|
if msg.content.to_lowercase() == "tom" {
|
||||||
reply(" <:tom:811324632082415626>", &msg, &ctx).await;
|
reply(" <:tom:811324632082415626>", &msg, &ctx).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (name, id) in REACTION_EMOTES.iter() {
|
for (name, id) in REACTION_EMOTES.iter() {
|
||||||
if msg.content.contains(name) {
|
if msg.content.to_lowercase().contains(name) {
|
||||||
if let Err(why) = msg.react(&ctx.http, ReactionType::Custom {
|
if let Err(why) = msg.react(&ctx.http, ReactionType::Custom {
|
||||||
animated: false,
|
animated: false,
|
||||||
id: *id,
|
id: *id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue