mirror of
https://github.com/Noratrieb/killjoy-turret.git
synced 2026-01-14 14:45:01 +01:00
warnings
This commit is contained in:
parent
bde1ec8ed1
commit
ea2ae4ddcb
1 changed files with 3 additions and 14 deletions
|
|
@ -5,15 +5,6 @@ use serenity::framework::standard::{
|
||||||
};
|
};
|
||||||
use serenity::model::prelude::*;
|
use serenity::model::prelude::*;
|
||||||
use serenity::prelude::*;
|
use serenity::prelude::*;
|
||||||
use serenity::{
|
|
||||||
async_trait,
|
|
||||||
collector::MessageCollectorBuilder,
|
|
||||||
framework::standard::{help_commands, CommandGroup, HelpOptions, StandardFramework},
|
|
||||||
futures::stream::StreamExt,
|
|
||||||
http::Http,
|
|
||||||
model::prelude::*,
|
|
||||||
prelude::*,
|
|
||||||
};
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
|
|
@ -31,10 +22,10 @@ struct AutoRole;
|
||||||
#[command]
|
#[command]
|
||||||
#[description = "Add auto assign roles"]
|
#[description = "Add auto assign roles"]
|
||||||
#[usage = "sdakhnfj"]
|
#[usage = "sdakhnfj"]
|
||||||
async fn autorole(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
|
async fn autorole(ctx: &Context, msg: &Message, _args: Args) -> CommandResult {
|
||||||
let http = &ctx.http;
|
let http = &ctx.http;
|
||||||
let mut data = ctx.data.write().await;
|
// let mut data = ctx.data.write().await;
|
||||||
let mut auto_roles = data.get_mut::<AutoRoleDataKey>();
|
// let mut auto_roles = data.get_mut::<AutoRoleDataKey>();
|
||||||
|
|
||||||
msg.channel_id
|
msg.channel_id
|
||||||
.send_message(http, |m| {
|
.send_message(http, |m| {
|
||||||
|
|
@ -53,8 +44,6 @@ async fn autorole(ctx: &Context, msg: &Message, args: Args) -> CommandResult {
|
||||||
|
|
||||||
while let Some(answer) = &msg.author.await_reply(&ctx).timeout(Duration::from_secs(30)).await {
|
while let Some(answer) = &msg.author.await_reply(&ctx).timeout(Duration::from_secs(30)).await {
|
||||||
if let Some(emote) = answer.content.split(' ').next() {
|
if let Some(emote) = answer.content.split(' ').next() {
|
||||||
lazy_static! {}
|
|
||||||
|
|
||||||
println!("should add emote: {}", emote);
|
println!("should add emote: {}", emote);
|
||||||
answer.react(http, '☑').await?;
|
answer.react(http, '☑').await?;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue