Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example for user moderation #709

Open
GrayJack opened this issue Aug 29, 2019 · 6 comments
Open

Add an example for user moderation #709

GrayJack opened this issue Aug 29, 2019 · 6 comments
Labels
examples Related to Serenity's examples. feature-request A new requested functionality.

Comments

@GrayJack
Copy link

I wondered how to do it, but there is no example of it

@Lakelezz Lakelezz added the examples Related to Serenity's examples. label Aug 29, 2019
@Lakelezz Lakelezz changed the title [Example] A example for channel moderation An example for channel moderation Aug 29, 2019
@Lakelezz
Copy link
Contributor

Hello, thank you for your issue!

Could you elaborate what you would expect from or in such an example?

@GrayJack
Copy link
Author

My end goal with my bot is to set/remove roles to people that call it and also kick people out in centain circumstances

@Lakelezz
Copy link
Contributor

You can find all what you need on the Member struct's methods: https://docs.rs/serenity/0.7.0/serenity/model/guild/struct.Member.html#methods

See add_role, remove_role, and kick. The members are located on the Cache, you can grab them via Cache::member.

If you have any further questions, feel free to ask. We also have a Discord for quick help :)

I'm not sure if this worth an example on its own, we will have to consider it.

@Lakelezz Lakelezz changed the title An example for channel moderation Add an example for user moderation Aug 29, 2019
@boehs
Copy link

boehs commented May 4, 2021

I think given the detailed nature of the examples already moderation commands are within scope, if not fairly easy for anyone somewhat proficient in rust to implement

@arqunis arqunis added the feature-request A new requested functionality. label May 4, 2021
@kangalio
Copy link
Collaborator

kangalio commented Apr 7, 2023

Can we close this issue or is there objection?

@jamesbt365
Copy link
Contributor

While this is a very common reason people make discord bots, the documentation exists and a lot of features typically tie into each other.

The examples more or less should show how to get started and how parts like builders work (considering the fact that they are mostly universal), so we don't realistically need an example for moderation actions.

Though, they wouldn't be much to maintain if anybody wants to submit one. But providing examples for everything neglects the documentation, and makes users rely too much on getting examples on absolutely everything the library can provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Related to Serenity's examples. feature-request A new requested functionality.
Projects
None yet
Development

No branches or pull requests

6 participants