Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

!heylisten !begone - Dynamic server channel listening, sane defaults JIT #73

Open
jakethedev opened this issue Sep 19, 2021 · 0 comments
Labels
feature / command Feature or new command
Milestone

Comments

@jakethedev
Copy link
Owner

jakethedev commented Sep 19, 2021

Ideas:

  • startup should call util/discord:getAllActiveChannels and load them up before being able to respond to messages
  • is caching fairly safe here? do we care about threadsafety? (if so, create another case for this like Battledao: commands that saveBattleState should be threadsafe #68)
  • chat with others: is a minimal "always on" set of channels ok or stupid?

how to handle invite event?

  • JIT set the values per call to getAllActive channels if none exist in the server BEFORE checking whether to respond

Blocker Notes

Currently blocked by server data cache #46 - this is mostly done though

Previously blocked by #30 and #31, the logic for this boils down really nicely, so it's just one case now

bot.js: handling dynamic channel listening
    if server not in serverdata: // this is just a getter and setter in util/serverdao
        get all channels from server // perhaps an abstraction can be built in util/discord
        save ID of all "defaults" found
        defaults in config.defaultChannels // FUTURE: when current servers all integrated, change this to like 3 simple ones for the docs
    if serverdata has channel id:
        if mod and message is 'begone'
            remove channel from server
        else
            run command
    else if mod and message is 'herebot':
        add channel to server
@jakethedev jakethedev added feature / command Feature or new command blocked Blocked by a case labeled Blocker needs-refined Boot too big for a single issue, but captures useful stuff/ideas labels Sep 19, 2021
@jakethedev jakethedev modified the milestones: v3.0.0, v4.0.0 Sep 19, 2021
@jakethedev jakethedev self-assigned this Sep 19, 2021
@jakethedev jakethedev modified the milestones: Release 4, Release 5 Sep 19, 2021
@jakethedev jakethedev removed their assignment Sep 19, 2021
@jakethedev jakethedev modified the milestones: Release 5, Release 6 Sep 19, 2021
@jakethedev jakethedev changed the title All commands should only run in active channels per server After #30 and #31, load active channels on startup, default set details in case Dec 5, 2021
This was referenced Dec 5, 2021
@jakethedev jakethedev changed the title After #30 and #31, load active channels on startup, default set details in case Load active channels on startup, sane defaults at... runtime? Dec 5, 2021
@jakethedev jakethedev changed the title Load active channels on startup, sane defaults at... runtime? Load active channels on startup, sane defaults JIT Jan 26, 2022
@jakethedev jakethedev removed blocked Blocked by a case labeled Blocker needs-refined Boot too big for a single issue, but captures useful stuff/ideas labels Jan 26, 2022
@jakethedev jakethedev changed the title Load active channels on startup, sane defaults JIT !heylisten !begone - Dynamic server channel listening, sane defaults JIT Jan 26, 2022
jakethedev added a commit that referenced this issue Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature / command Feature or new command
Projects
None yet
Development

No branches or pull requests

1 participant