Handbook
Glossary
MESSAGE_CREATE
Vocabulary
discord
Definition
IN:
discord
SINGLETON:
MESSAGE_CREATE
Methods
USING:
arrays
assocs
discord
discord.chatgpt-bot
hashtables
kernel
openai
sequences
splitting
unicode
;
M:
MESSAGE_CREATE
discord-chatgpt-bot
drop
dup
obey-message?
[
"content"
of
"chatgpt: "
?head
[
[
blank?
]
trim
[
[
"content"
]
]
dip
[
]
curry
compose
{
}
like
[
[
{
"role"
"user"
}
]
]
dip
[
]
curry
compose
{
}
like
>hashtable
1array
<cheapest-chat-completion>
[
g...
gflush
]
[
chat-completions
]
bi
first-chat-completion
reply-message
]
[
drop
]
if
]
[
drop
]
if
;
USING:
combinators.short-circuit
continuations
discord
kernel
;
M:
MESSAGE_CREATE
discord-help-bot
drop
[
{
[
reply-command
]
[
reply-echo
]
}
1||
drop
]
curry
[
g...
gflush
]
recover
;
USING:
assocs
combinators
discord
io
kernel
namespaces
sequences
;
M:
MESSAGE_CREATE
dispatch-message
drop
[
"MESSAGE_CREATE"
write
bl
[
{
[
[
"guild_id"
of
]
[
"channel_id"
of
]
bi
guild-channel-name
write
bl
]
[
"id"
of
"id:"
prepend
write
bl
]
[
"author"
of
"username"
of
":"
append
write
bl
]
[
"content"
of
"`"
dup
surround
print
flush
]
}
cleave
]
[
{
[
[
"guild_id"
of
]
[
"channel_id"
of
]
bi
]
[
"id"
of
]
[
"author"
of
"username"
of
]
[
"content"
of
]
}
cleave
handle-incoming-message
]
bi
]
with-global
;