Begin to work on thread support
This commit is contained in:
@@ -26,7 +26,7 @@ use crate::{
|
||||
interval_parser::parse_duration,
|
||||
models::{
|
||||
reminder::{
|
||||
builder::{MultiReminderBuilder, ReminderScope},
|
||||
builder::{ChannelWithThread, MultiReminderBuilder, ReminderScope},
|
||||
content::Content,
|
||||
errors::ReminderError,
|
||||
},
|
||||
@@ -406,7 +406,8 @@ pub async fn create_reminder(
|
||||
let id = i.get(2).unwrap().as_str().parse::<u64>().unwrap();
|
||||
|
||||
if pref == "#" {
|
||||
ReminderScope::Channel(id)
|
||||
let channel_with_thread = ChannelWithThread { channel_id: id, thread_id: None };
|
||||
ReminderScope::Channel(channel_with_thread)
|
||||
} else {
|
||||
ReminderScope::User(id)
|
||||
}
|
||||
@@ -482,7 +483,11 @@ pub async fn create_reminder(
|
||||
|
||||
if list.is_empty() {
|
||||
if ctx.guild_id().is_some() {
|
||||
vec![ReminderScope::Channel(ctx.channel_id().get())]
|
||||
let channel_with_threads = ChannelWithThread {
|
||||
channel_id: ctx.channel_id().get(),
|
||||
thread_id: None,
|
||||
};
|
||||
vec![ReminderScope::Channel(channel_with_threads)]
|
||||
} else {
|
||||
vec![ReminderScope::User(ctx.author().id.get())]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user