-
-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import discord | ||
from discord.commands import slash_command, SlashCommandGroup | ||
from discord.ext import commands | ||
|
||
|
||
class Temptests(commands.Cog): | ||
def __init__(self, bot): | ||
self.bot = bot | ||
|
||
gtest = SlashCommandGroup("gtest", "gtest") | ||
|
||
@gtest.command(name="dothing", description="gtest") | ||
async def gtest_dothing(self, ctx: discord.ApplicationContext): | ||
await ctx.respond("gtest_dothing") | ||
print(self.bot.application_commands) | ||
print(self.bot._application_commands) | ||
|
||
@slash_command(name="test838") | ||
async def test838(self, ctx: discord.ApplicationContext): | ||
"""Test for #838""" | ||
await ctx.respond("Test for #838") | ||
self.bot.reload_extension("ext2") | ||
|
||
|
||
def setup(bot): | ||
bot.add_cog(Temptests(bot)) | ||
print('h') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from discord.ext import commands | ||
from discord.commands import slash_command | ||
|
||
|
||
class Temptests2(commands.Cog): | ||
def __init__(self, bot): | ||
self.bot = bot | ||
|
||
@slash_command() | ||
async def testing838(self, ctx): | ||
await ctx.respond("Test for #838") | ||
self.bot.reload_extension("ext") | ||
|
||
|
||
def setup(bot): | ||
bot.add_cog(Temptests2(bot)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import discord | ||
intents = discord.Intents.all() | ||
|
||
|
||
bot = discord.Bot(debug_guilds=[911706065836605471]) | ||
extensions = ['ext', 'ext2'] | ||
for extension in extensions: | ||
bot.load_extension(extension) | ||
|
||
@bot.event | ||
async def on_ready(): | ||
print('Logged in as') | ||
print(bot.user.name) | ||
print(bot.user.id) | ||
print('------') | ||
print(bot.application_commands) | ||
print(bot._application_commands) | ||
|
||
bot.run("OTMyNDY2OTc4NjcxNjkzODk1.YeTZjA.p4y7vE2Kw0uOC_WxPB-KO_G6VII") |