blob: 5be04104d946fae0483ccaec354996a406e024fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
# Discord Ban List wrapper for python
Non-official wrapper for [Discord Bans][dbans].
## Installation
just `pip install https://github.com/romangraef/discord_ban_list/archive/master.zip`
## Usage
```python
from discord_ban_list import DiscordBanList
ban_list = DiscordBanList('YOUR_TOKEN')
async def on_something():
ban_entries = ban_list.check(123456789123456789)
ban_entry = ban_entries[0]
print(ban_entry.banned)
print(ban.user_id)
print(ban.case_id)
print(ban.reason)
print(ban.proof)
async def on_something_two():
ban_entries = ban_list.check(0, 1, 2, 0)
# automatically only check 0, 1 and 2
# we also have client side handling for the 99 users limit
for entry in ban_entries:
print(f'{ban.user_id} - {ban.banned}')
```
[dbans]: https://bans.discord.id
|