Passed
Push — main ( 05f81d...c2214f )
by Yohann
02:15 queued 12s
created

pincer.middleware.guild_create.export()   A

Complexity

Conditions 1

Size

Total Lines 2
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
cc 1
nop 0
1
# Copyright Pincer 2021-Present
2
# Full MIT License can be found in `LICENSE` at the project root.
3
4
"""sent when a guild is created/joined on the client"""
5
6
from ..core.dispatch import GatewayDispatch
7
from ..objects.guild import Guild
8
9
async def guild_create_middleware(self, payload: GatewayDispatch):
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
10
    return "on_guild_create", [
11
        Guild.from_dict(
12
            {"_client": self, "_http": self.http, **payload.data}
13
        )
14
    ]
15
16
def export():
0 ignored issues
show
introduced by
Missing function or method docstring
Loading history...
17
    return guild_create_middleware
18