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 option to get a user/channel from name or ID #12

Closed
SpinahVieh opened this issue Oct 13, 2015 · 1 comment
Closed

Add option to get a user/channel from name or ID #12

SpinahVieh opened this issue Oct 13, 2015 · 1 comment

Comments

@SpinahVieh
Copy link

Right now you always have to wait for a channel or user to be active in some way, which results in problems. For example when you want the bot to type regularly in a specific channel you always need to grab it from someone typing in it first. So you cant make the bot post a text every five minutes in the channel unless somebody types in that channel before. Equal for users, but the problem is rather minor there.

@Rapptz
Copy link
Owner

Rapptz commented Oct 13, 2015

There's Client.get_channel which you pass in a string ID and you get the channel.

For users you can use discord.utils.find.

e.g. discord.utils.find(lambda m: m.name == 'Hello', some_server.members).

@Rapptz Rapptz closed this as completed Oct 14, 2015
IAmTomahawkx pushed a commit to iDevision/enhanced-discord.py that referenced this issue Apr 3, 2022
* Clean up python

* Clean up bot python

* revert lists

* revert commands.bot completely

* extract raise_expected_coro further

* add new lines

* removed erroneous import

* remove hashed line
IAmTomahawkx pushed a commit to iDevision/enhanced-discord.py that referenced this issue Apr 3, 2022
IAmTomahawkx pushed a commit to iDevision/enhanced-discord.py that referenced this issue Apr 3, 2022
* add attachment support

* typing fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants