mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-04 00:55:19 +00:00
Fix type errors in all examples
This commit is contained in:
@ -6,6 +6,8 @@ import discord
|
||||
|
||||
|
||||
class Bot(commands.Bot):
|
||||
user: discord.ClientUser
|
||||
|
||||
def __init__(self):
|
||||
intents = discord.Intents.default()
|
||||
intents.message_content = True
|
||||
|
@ -6,6 +6,9 @@ import discord
|
||||
|
||||
|
||||
class CounterBot(commands.Bot):
|
||||
# Suppress error on the User attribute being None since it fills up later
|
||||
user: discord.ClientUser
|
||||
|
||||
def __init__(self):
|
||||
intents = discord.Intents.default()
|
||||
intents.message_content = True
|
||||
|
@ -38,6 +38,9 @@ class DropdownView(discord.ui.View):
|
||||
|
||||
|
||||
class Bot(commands.Bot):
|
||||
# Suppress error on the User attribute being None since it fills up later
|
||||
user: discord.ClientUser
|
||||
|
||||
def __init__(self):
|
||||
intents = discord.Intents.default()
|
||||
intents.message_content = True
|
||||
|
@ -70,6 +70,9 @@ class DynamicCounter(
|
||||
|
||||
|
||||
class DynamicCounterBot(commands.Bot):
|
||||
# Suppress error on the User attribute being None since it fills up later
|
||||
user: discord.ClientUser
|
||||
|
||||
def __init__(self):
|
||||
intents = discord.Intents.default()
|
||||
super().__init__(command_prefix=commands.when_mentioned, intents=intents)
|
||||
|
@ -6,6 +6,9 @@ import discord
|
||||
|
||||
|
||||
class EphemeralCounterBot(commands.Bot):
|
||||
# Suppress error on the User attribute being None since it fills up later
|
||||
user: discord.ClientUser
|
||||
|
||||
def __init__(self):
|
||||
intents = discord.Intents.default()
|
||||
intents.message_content = True
|
||||
|
@ -6,6 +6,9 @@ import discord
|
||||
|
||||
|
||||
class Bot(commands.Bot):
|
||||
# Suppress error on the User attribute being None since it fills up later
|
||||
user: discord.ClientUser
|
||||
|
||||
def __init__(self):
|
||||
intents = discord.Intents.default()
|
||||
intents.message_content = True
|
||||
|
@ -7,6 +7,9 @@ from urllib.parse import quote_plus
|
||||
|
||||
|
||||
class GoogleBot(commands.Bot):
|
||||
# Suppress error on the User attribute being None since it fills up later
|
||||
user: discord.ClientUser
|
||||
|
||||
def __init__(self):
|
||||
intents = discord.Intents.default()
|
||||
intents.message_content = True
|
||||
|
@ -64,6 +64,9 @@ class DynamicButton(discord.ui.DynamicItem[discord.ui.Button], template=r'button
|
||||
|
||||
|
||||
class PersistentViewBot(commands.Bot):
|
||||
# Suppress error on the User attribute being None since it fills up later
|
||||
user: discord.ClientUser
|
||||
|
||||
def __init__(self):
|
||||
intents = discord.Intents.default()
|
||||
intents.message_content = True
|
||||
|
@ -121,6 +121,9 @@ class TicTacToe(discord.ui.View):
|
||||
|
||||
|
||||
class TicTacToeBot(commands.Bot):
|
||||
# Suppress error on the User attribute being None since it fills up later
|
||||
user: discord.ClientUser
|
||||
|
||||
def __init__(self):
|
||||
intents = discord.Intents.default()
|
||||
intents.message_content = True
|
||||
|
Reference in New Issue
Block a user