worldbuilding / kaztron Goto Github PK
View Code? Open in Web Editor NEWA custom Discord bot for various writing communities
Home Page: http://worldbuilding.network/kaztron
License: Other
A custom Discord bot for various writing communities
Home Page: http://worldbuilding.network/kaztron
License: Other
Feasibility? Possible to automatically convert the msg attachment to a URL embedded in the modnote?
rotation of kaztron statuses, add "playing with your hats" (requested by Derpquake on worldbuilding)
[11:56] BOTBotTest9000: [ERROR] While executing [2018-02-17 16:56:57] <#bottest:Grine#9440> '.notes *a'
ValueError: invalid literal for int() with base 10: 'a'
See logs for details
User input is very iffy for Discord ID. Improve robustness:
<@123456789012345678>
, @123456789012345678
, etc. - maybe look for a digits-only substring for maximum flexibility2018-02-23
[21:03] BOTBotTest9000: [ERROR] While executing [2018-02-24 02:03:58] <#bot_test:AntimatterNuke#7807> '.spotlight join'
Discord API error FORBIDDEN (status code: 403): Cannot send messages to this user
See log for details
.notes group rem
- if user is not in a group, should give an error message, not 'ungrouped'.notes group add
- if two users are already grouped, should give an error message, not 'grouped'Both operations are idempotent - functionally no change, purely a usability issue
Our next host is User#1234, presenting their project, Project Title!
Welcome, User#1234!
Username is not a mention in these messages
Priority TBD
[2018-02-11 16:11:18,241] (DEBUG) websockets.protocol: client << Frame(fin=True, opcode=8, data=b'\x03\xe8') [in /home/marcalexc/.virtualenvs/kaztron/lib/python3.6/site-packages/websockets/protocol.py:548]
[2018-02-11 16:11:18,241] (DEBUG) websockets.protocol: client >> Frame(fin=True, opcode=8, data=b'\x03\xe8') [in /home/marcalexc/.virtualenvs/kaztron/lib/python3.6/site-packages/websockets/protocol.py:564]
[2018-02-11 16:11:18,244] (INFO) kaztron.bootstrap: Closing event loop... [in /home/marcalexc/data/sw/KazTron/KazTron.py:64]
[2018-02-11 16:11:18,245] (INFO) kaztron.bootstrap: Exiting. [in /home/marcalexc/data/sw/KazTron/KazTron.py:66]
No notable traffic prior to this - normal message send/receives, user status changes, at least 60s prior to this.
Appears to be the remote server closing the websocket?
Per discussion with Yazuki:
ctx.message.channel
), if the selected user is not on the server.filter rem <index or page>
excludes numerical match (possible scenario: bot spam consistently uses a very identifiable string; could be dangerous because if allowed on add
, a rem
could accidentally hit another rule instead of the numerical match).filter rem index=x
would disallow an index=x
string, which is unlikely enough that this might be OK. However, it's unintuitive.filter rem
vs. .filter rnum
- unambiguous, but pollutes namespace, more commands to remember - slightly less user friendly?Affected: v1.3b2
[ERROR] While executing [2018-02-17 17:02:59] <#bottest:Grine#9440> '.notes group'
AttributeError: 'ModNotes' object has no attribute 'link'
See logs for details
From Grine_
2018-02-28 00:02:47
A bot-managed “On Duty” role, that can be used to notify active moderators without pinging atHere or atDiscordTeam. Mods could set themselves as on or off duty at will.
@Yazuki (屮゚Д゚)屮
2018-03-08 00:18:47
fix kaztron so it doesn't think .___. is a command and not a smiley
Possible solution: Assume anything that matches ^\.\W
is not a command? Or anything not containing word characters at all (any emoticons that contain word chars but start with a period)?
TBD which logger names to limit... mostly library dependencies e.g. websockets.protocol is horrendously verbose. We want to reduce this verbosity without losing out on debug logs from KazTron itself or other useful logs.
Rationale: 600MB log in 1 week
Currently only implemented in logs and terminal:
Logged in as KazTron Test - Lao (id:412447001142231041)
KazTron version 1.3b2
discord.py version 0.16.12
.spotlight [queue|q] <ctx>
[MOD ONLY] The `.spotlight queue` sub-command contains sub-sub-commands that let moderators
manage a queue of upcoming spotlights.
Commands:
insert [MOD ONLY] Insert a spotlight application into the queue of upcoming...
rem
next [MOD ONLY] Set the next spotlight in the queue as the currently sele...
list [MOD ONLY] Lists the current queue of upcoming spotlights.
add [MOD ONLY] Add a spotlight application to the end of the queue of up...
Type .help command for more info on a command.
You can also type .help category for more info on a category.
Affected version: 1.3 beta-2
e.g.
[15:01] Laogeobunny: .notes restore 0001
[15:01] BOTKazTron Lao: Only mods can use that command.
Expected: "Only admins can use that command."
Several cogs are dependent on on_ready running prior to commands being available (loading data from servers, etc.)
A global or optional cog-level check to prevent commands being run before on_ready would avoid bugs due to this (including some destructive ones - e.g. if the bot hasn't loaded state.json configs and a command attempts to write to these structures, it can delete data)
May be related to the proposed refactors of #48
[2018-03-02 06:38:27,215] (DEBUG) kaztron.cog.modtools: wb: random image = 7 [in /kaztron-prod/KazTron/kaztron/cog/modtools.py:109]
[2018-03-02 06:38:27,215] (WARNING) kaztron.cog.modtools: wb: Invalid index: [2018-03-02 06:38:27] <#worldbuilding:Laogeobunny#4569> '.wb' [in /kaztron-prod/KazTron/kaztron/cog/modtools.py:114]
len(images) == 7, range should be 0-6 but here rolled 7
Various issues with voice features:
From: Grine_
2018-03-01 02:32:53
Detect users leaving and report to #bot-output
Currently, most cogs manually call get_kaztron_config()
and store a reference in an attribute, as well as similar calls for the state.json
config and any cog-specific config files. For the latter two, many of them also tend to have
Can this be generalised to reduce repetition?
.notes @user alias add <alias>
instead of .notes alias add @user <alias>
Cache issue?
Need logs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.