Closed Miezhiko closed 1 year ago
You don't need the full channel to send a message, so does this work at all?
messageWithSnowflake ∷ (BotC r)
=> (Snowflake Channel, Text)
-> P.Sem r ()
messageWithSnowflake (chanId, txt) = do
void $ invoke (CreateMessage chanId (def & #content ?~ txt))
you could also try print
ing the response:
messageWithSnowflake ∷ (BotC r)
=> (Snowflake Channel, Text)
-> P.Sem r ()
messageWithSnowflake (chanId, txt) = do
r <- invoke (CreateMessage chanId (def & #content ?~ txt))
print r
first code doesn't work, seems like, print has different type (IO)
messageWithSnowflake ∷ (BotC r)
=> (Snowflake Channel, Text)
-> P.Sem r ()
messageWithSnowflake (chanId, txt) = do
r <- invoke (CreateMessage chanId (def & #content ?~ txt))
P.embed $ print r
sorry, issue was on my side, even not in code but I've used to run old version >_<
I try to add two methods
also was trying with
messageWithSnowflake (chan, txt) = void $ tell @Text chan txt
and with some reason replyIO is working but msgIO is not when I'm trying just to send message on channel, no error messages either but possibly I just can't see prints inside it... what is possibly going wrong or how can I find out