tangled
alpha
login
or
join now
bwc9876.dev
/
bingus-bot
0
fork
atom
The world's most clever kitty cat
0
fork
atom
overview
issues
pulls
pipelines
fixed formatting
authored by
Locochoco
and committed by
bwc9876.dev
11 months ago
afa3657c
e032a1e8
verified
This commit was signed with the committer's
known signature
.
bwc9876.dev
SSH Key Fingerprint:
SHA256:DanMEP/RNlSC7pAVbnXO6wzQV00rqyKj053tz4uH5gQ=
+6
-9
2 changed files
expand all
collapse all
unified
split
src
bingus
cogs
markov.py
lib
markov.py
+5
-8
src/bingus/cogs/markov.py
···
109
109
await ctx.respond("> Bingus learned something from image!", ephemeral=True)
110
110
await self.update_words()
111
111
except PIL.UnidentifiedImageError:
112
112
-
await ctx.respond(
113
113
-
"> Bingus only understands image files!", ephemeral=True
114
114
-
)
112
112
+
await ctx.respond("> Bingus only understands image files!", ephemeral=True)
115
113
116
114
@require_owner
117
115
@commands.slash_command()
···
131
129
132
130
@require_owner
133
131
@commands.slash_command()
134
134
-
async def forget(
135
135
-
self, ctx: discord.ApplicationContext):
136
136
-
self.markov.forget()
137
137
-
await ctx.respond("> Bingus forgot everything!", ephemeral=True)
138
138
-
await self.update_words()
132
132
+
async def forget(self, ctx: discord.ApplicationContext):
133
133
+
self.markov.forget()
134
134
+
await ctx.respond("> Bingus forgot everything!", ephemeral=True)
135
135
+
await self.update_words()
139
136
140
137
@commands.Cog.listener()
141
138
async def on_ready(self):
+1
-1
src/bingus/lib/markov.py
···
131
131
self._learn_from_tokens(tokens)
132
132
133
133
def forget(self):
134
134
-
self.edges = {}
134
134
+
self.edges = {}
135
135
136
136
def _pick_next(self, current_token: Token, allow_end: bool) -> Token:
137
137
transitions = self.edges.get(current_token)