configure playing status
This commit is contained in:
parent
d7a0b727fb
commit
8bad95510d
@ -32,3 +32,20 @@ CREATE TABLE reminder_template (
|
|||||||
);
|
);
|
||||||
|
|
||||||
ALTER TABLE reminders ADD COLUMN embed_fields JSON;
|
ALTER TABLE reminders ADD COLUMN embed_fields JSON;
|
||||||
|
|
||||||
|
update reminders
|
||||||
|
inner join embed_fields as E
|
||||||
|
on E.reminder_id = reminders.id
|
||||||
|
set embed_fields = (
|
||||||
|
select JSON_ARRAYAGG(
|
||||||
|
JSON_OBJECT(
|
||||||
|
'title', E.title,
|
||||||
|
'value', E.value,
|
||||||
|
'inline',
|
||||||
|
if(inline = 1, cast(TRUE as json), cast(FALSE as json))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
from embed_fields
|
||||||
|
group by reminder_id
|
||||||
|
having reminder_id = reminders.id
|
||||||
|
);
|
||||||
|
@ -14,6 +14,9 @@ pub async fn listener(
|
|||||||
data: &Data,
|
data: &Data,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
match event {
|
match event {
|
||||||
|
poise::Event::Ready { .. } => {
|
||||||
|
ctx.set_activity(serenity::Activity::watching("for /remind")).await;
|
||||||
|
}
|
||||||
poise::Event::CacheReady { .. } => {
|
poise::Event::CacheReady { .. } => {
|
||||||
info!("Cache Ready! Preparing extra processes");
|
info!("Cache Ready! Preparing extra processes");
|
||||||
|
|
||||||
|
@ -171,8 +171,6 @@ async fn _main(tx: Sender<()>) -> Result<(), Box<dyn StdError + Send + Sync>> {
|
|||||||
.token(discord_token)
|
.token(discord_token)
|
||||||
.user_data_setup(move |ctx, _bot, framework| {
|
.user_data_setup(move |ctx, _bot, framework| {
|
||||||
Box::pin(async move {
|
Box::pin(async move {
|
||||||
ctx.set_activity(Activity::watching("for /remind")).await;
|
|
||||||
|
|
||||||
register_application_commands(
|
register_application_commands(
|
||||||
ctx,
|
ctx,
|
||||||
framework,
|
framework,
|
||||||
|
Loading…
Reference in New Issue
Block a user