Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bot/exts/info/code_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from discord.ext.commands import Cog

from bot.bot import Bot
from bot.constants import Channels
from bot.constants import Channels, Keys
from bot.log import get_logger
from bot.utils.messages import wait_for_deletion

Expand All @@ -28,6 +28,8 @@
)

GITHUB_HEADERS = {"Accept": "application/vnd.github.v3.raw"}
if Keys.github:
GITHUB_HEADERS["Authorization"] = f"token {Keys.github}"

GITLAB_RE = re.compile(
r"https://gitlab\.com/(?P<repo>[\w.-]+/[\w.-]+)/\-/blob/(?P<path>[^#>]+)"
Expand Down