pikaninja
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with
12 additions and
20 deletions
-
examples/background_task.py
-
examples/background_task_asyncio.py
-
examples/basic_voice.py
-
examples/deleted.py
-
examples/edits.py
-
examples/guessing_game.py
-
examples/new_member.py
-
examples/reply.py
|
|
@ -13,9 +13,7 @@ class MyClient(discord.Client): |
|
|
|
self.my_background_task.start() |
|
|
|
|
|
|
|
async def on_ready(self): |
|
|
|
print('Logged in as') |
|
|
|
print(self.user.name) |
|
|
|
print(self.user.id) |
|
|
|
print(f'Logged in as {self.user} (ID: {self.user.id})') |
|
|
|
print('------') |
|
|
|
|
|
|
|
@tasks.loop(seconds=60) # task runs every 60 seconds |
|
|
|
|
|
@ -9,9 +9,7 @@ class MyClient(discord.Client): |
|
|
|
self.bg_task = self.loop.create_task(self.my_background_task()) |
|
|
|
|
|
|
|
async def on_ready(self): |
|
|
|
print('Logged in as') |
|
|
|
print(self.user.name) |
|
|
|
print(self.user.id) |
|
|
|
print(f'Logged in as {self.user} (ID: {self.user.id})') |
|
|
|
print('------') |
|
|
|
|
|
|
|
async def my_background_task(self): |
|
|
|
|
|
@ -128,7 +128,9 @@ bot = commands.Bot(command_prefix=commands.when_mentioned_or("!"), |
|
|
|
|
|
|
|
@bot.event |
|
|
|
async def on_ready(): |
|
|
|
print(f'Logged in as {bot.user} ({bot.user.id})') |
|
|
|
print('Logged in as') |
|
|
|
print(bot.user.name) |
|
|
|
print(bot.user.id) |
|
|
|
print('------') |
|
|
|
|
|
|
|
bot.add_cog(Music(bot)) |
|
|
|
|
|
@ -2,8 +2,8 @@ import discord |
|
|
|
|
|
|
|
class MyClient(discord.Client): |
|
|
|
async def on_ready(self): |
|
|
|
print('Connected!') |
|
|
|
print(f'Username: {self.user.name}\nID: {self.user.id}') |
|
|
|
print(f'Logged in as {self.user} (ID: {self.user.id})') |
|
|
|
print('------') |
|
|
|
|
|
|
|
async def on_message(self, message): |
|
|
|
if message.content.startswith('!deleteme'): |
|
|
|
|
|
@ -3,8 +3,8 @@ import asyncio |
|
|
|
|
|
|
|
class MyClient(discord.Client): |
|
|
|
async def on_ready(self): |
|
|
|
print('Connected!') |
|
|
|
print(f'Username: {self.user.name}\nID: {self.user.id}') |
|
|
|
print(f'Logged in as {self.user} (ID: {self.user.id})') |
|
|
|
print('------') |
|
|
|
|
|
|
|
async def on_message(self, message): |
|
|
|
if message.content.startswith('!editme'): |
|
|
|
|
|
@ -4,9 +4,7 @@ import asyncio |
|
|
|
|
|
|
|
class MyClient(discord.Client): |
|
|
|
async def on_ready(self): |
|
|
|
print('Logged in as') |
|
|
|
print(self.user.name) |
|
|
|
print(self.user.id) |
|
|
|
print(f'Logged in as {self.user} (ID: {self.user.id})') |
|
|
|
print('------') |
|
|
|
|
|
|
|
async def on_message(self, message): |
|
|
|
|
|
@ -4,9 +4,7 @@ import discord |
|
|
|
|
|
|
|
class MyClient(discord.Client): |
|
|
|
async def on_ready(self): |
|
|
|
print('Logged in as') |
|
|
|
print(self.user.name) |
|
|
|
print(self.user.id) |
|
|
|
print(f'Logged in as {self.user} (ID: {self.user.id})') |
|
|
|
print('------') |
|
|
|
|
|
|
|
async def on_member_join(self, member): |
|
|
|
|
|
@ -2,9 +2,7 @@ import discord |
|
|
|
|
|
|
|
class MyClient(discord.Client): |
|
|
|
async def on_ready(self): |
|
|
|
print('Logged in as') |
|
|
|
print(self.user.name) |
|
|
|
print(self.user.id) |
|
|
|
print(f'Logged in as {self.user} (ID: {self.user.id})') |
|
|
|
print('------') |
|
|
|
|
|
|
|
async def on_message(self, message): |
|
|
|