Have bot dynamically determine date of oldest message in quotes_channel_id #186

Closed
opened 2025-12-15 05:10:46 -05:00 by sirdog3355 · 1 comment
sirdog3355 commented 2025-12-15 05:10:46 -05:00 (Migrated from github.com)

Right now, EnduraBot is given a hard-coded date that is in the vicinity of the first message ever sent to #out-of-context.

num_days = datetime.now(timezone.utc) - datetime(2022, 3, 14, 0, 0, 0, tzinfo=timezone.utc)

Now, this could be made a variable, but it feels like that would be archaic and unnecessarily manual.

Desired functionality is to have the bot, on boot, find the oldest message in the out_of_context_channel_id dynamically. I'm uncertain if this is possible to do without iterating through the whole channel, which would make the entire point of doing the date calculations moot, but if it is, that would be preferable.

Right now, EnduraBot is given a hard-coded date that is in the vicinity of the first message ever sent to `#out-of-context`. ```py num_days = datetime.now(timezone.utc) - datetime(2022, 3, 14, 0, 0, 0, tzinfo=timezone.utc) ``` Now, this *could* be made a variable, but it feels like that would be archaic and unnecessarily manual. Desired functionality is to have the bot, on boot, find the oldest message in the `out_of_context_channel_id` dynamically. I'm uncertain if this is possible to do without iterating through the whole channel, which would make the entire point of doing the date calculations moot, but if it is, that would be preferable.
sirdog3355 commented 2025-12-28 21:47:20 -05:00 (Migrated from github.com)

Resolved by #203; documentation updated. Closing as completed.

Resolved by #203; documentation updated. Closing as completed.
Sign in to join this conversation.
No description provided.