tucu tuuuuu
xyaman / panda Goto Github PK
View Code? Open in Web Editor NEWAn async Rust library for Discord
License: Apache License 2.0
An async Rust library for Discord
License: Apache License 2.0
tucu tuuuuu
Is there any way to get an HttpClient for my bot except in the bot event handlers? I want to do this so that I can create a discord bridge to another chat application, which means that it needs to be able to send messages at arbitrary times, not triggered by discord events. Currently I see that you could wait for on_ready
and set a mutable Option<Arc<SessionData<S>>>
to Some(data.clone())
, but is there any other way to do this?
Attachments don't seem to be working on_message_create. It always gives an empty Vec
client.on_message_create(|s, data| async move {
if data.channel_id == CHANNEL {
println!(
"Message \"{}\" in {}\nattatchments: {:#?}",
data.content, data.channel_id, data.attatchments
);
}
Ok(())
});
Hi,
When trying to add an image to an embed message, the function need a EmbedImage structure but this one is private (all are except the main Embed model).
Cheer.
Tested with version 0.5.2 in crates.io.
The function panda::client::Client::on_message_delete_bulk
seems to expect a wrong argument type : it waits for a function expecting a panda::events::MessageDelete
structure but a panda::events::MessageDeleteBulk
exists, so I'm wondering if the argument type is not wrong since it looks like a typo mistake. Moreover, the documentation says it "[sets] the handler for MessageDeleteBulk
event".
Please, consider updating this function if I'm right.
Hi,
I'm trying to use the function update_status but it can't seems to work.
I'm trying to get it from state or the session but since I'm using a custom one (see #1) maybe it's what posing problem here?
Hi,
First, thanks for the lib!
I got a little problem, I need to be able to access my database pool in on_message_create (and probably others) but I can't pass parameters to the function that is passed in it :
client.on_message_create(message_manage(pool);
because it ask me to pass Session<()> and MessageCreate which are passed by default
async fn message_manage(s: Session<()>, msg: MessageCreate, pool: MysqlPool) -> HandlerResult {
How would you to it? Can I get Session and MessageCreate at this moment and pass them "manually"?
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.