Completed
Push — main ( 3a3ea0...93fa25 )
by Yohann
23s queued 12s
created

pincer.objects.app.application   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 98
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 28
dl 0
loc 98
rs 10
c 0
b 0
f 0
1
# Copyright Pincer 2021-Present
0 ignored issues
show
introduced by
Missing module docstring
Loading history...
2
# Full MIT License can be found in `LICENSE` at the project root.
3
4
from __future__ import annotations
5
6
from dataclasses import dataclass
7
from typing import Optional, List, TYPE_CHECKING
8
9
from ..user import User
10
from ...utils.api_object import APIObject
11
from ...utils.types import MISSING
12
13
if TYPE_CHECKING:
14
    from ...utils import APINullable, Snowflake
15
16
17
@dataclass
0 ignored issues
show
best-practice introduced by
Too many instance attributes (17/7)
Loading history...
18
class Application(APIObject):
19
    """
20
    Represents a Discord application. (eg Bot, OAuth)
21
22
    :param bot_public:
23
        when false only app owner can join the app's bot to guilds
24
25
    :param bot_require_code_grant:
26
        when true the app's bot will only join upon completion of the
27
        full oauth2 code grant flow
28
29
    :param description:
30
        the description of the app
31
32
    :param id:
33
        the id of the app
34
35
    :param icon:
36
        the icon hash of the app
37
38
    :param name:
39
        the name of the app
40
41
    :param privacy_policy_url:
42
        the url of the app's privacy policy
43
44
    :param summary:
45
        if this application is a game sold on Discord, this field will be the
46
        summary field for the store page of its primary sku
47
48
    :param verify_key:
49
        the hex encoded key for verification in interactions and the GameSDK's
50
        GetTicket
51
52
    :param cover_image:
53
        the application's default rich presence invite cover image hash
54
55
    :param flags:
56
        the application's public flags
57
58
    :param guild_id:
59
        if this application is a game sold on Discord, this field will be the
60
        guild to which it has been linked
61
62
    :param owner:
63
        partial user object containing info on the owner of the application
64
65
    :param primary_sku_id:
66
        if this application is a game sold on Discord, this field will be the
67
        id of the "Game SKU" that is created, if exists
68
69
    :param rpc_origins:
70
        an array of rpc origin urls, if rpc is enabled
71
72
    :param slug:
73
        if this application is a game sold on Discord, this field will be the
74
        URL slug that links to the store page
75
76
    :param terms_of_service_url:
77
        the url of the app's terms of service
78
    """
79
80
    bot_public: bool
81
    bot_require_code_grant: bool
82
    description: str
83
    id: Snowflake
0 ignored issues
show
introduced by
The variable Snowflake does not seem to be defined in case TYPE_CHECKING on line 13 is False. Are you sure this can never be the case?
Loading history...
84
    icon: Optional[str]
85
    name: str
86
    privacy_policy_url: APINullable[str]
0 ignored issues
show
introduced by
The variable APINullable does not seem to be defined in case TYPE_CHECKING on line 13 is False. Are you sure this can never be the case?
Loading history...
87
    summary: str
88
    verify_key: str
89
90
    cover_image: APINullable[str] = MISSING
91
    flags: APINullable[int] = MISSING
92
    guild_id: APINullable[Snowflake] = MISSING
93
    owner: APINullable[User] = MISSING
94
    primary_sku_id: APINullable[Snowflake] = MISSING
95
    rpc_origins: APINullable[List[str]] = MISSING
96
    slug: APINullable[str] = MISSING
97
    terms_of_service_url: APINullable[str] = MISSING
98