Skip to content
This repository has been archived by the owner on Dec 26, 2022. It is now read-only.

Commit

Permalink
馃泜 added User-Agent header
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunarmagpie committed Nov 30, 2021
1 parent 898c18d commit 7eba5e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pincer/core/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

from aiohttp import ClientSession, ClientResponse

# Im open for ideas on how to get __version__ without doing this
import pincer
from . import __package__
from .._config import GatewayConfig
from ..exceptions import (
Expand Down Expand Up @@ -73,6 +75,7 @@ def __init__(self, token: str, *, version: int = None, ttl: int = 5):

headers: Dict[str, str] = {
"Authorization": f"Bot {token}",
"User-Agent": f"DiscordBot (https://github.com/Pincer-org/Pincer, {pincer.__version__})" # noqa: E501
}
self.__session: ClientSession = ClientSession(headers=headers)

Expand Down

0 comments on commit 7eba5e6

Please sign in to comment.