#how import IntegrationType

1 messages · Page 1 of 1 (latest)

robust sinew
#

result:
from interactions import IntegrationType
ImportError: cannot import name 'IntegrationType' from 'interactions'

exotic aspenBOT
#

Hey! Once your issue is solved, press the button below to close this thread!

robust sinew
#

from interactions import integration_types

i also try this one but still not work

robust sinew
#
import interactions
from interactions import Client, slash_command, SlashContext, OptionType, slash_option, listen
from interactions import integration_type
from interactions.api.events import GuildJoin, MemberAdd
with open("token.txt", "r") as file:
    TOKEN = file.read().strip()
bot_token = "my_token"
bot = interactions.Client(token=bot_token, intents=interactions.Intents.ALL | interactions.Intents.GUILD_MEMBERS)
async def on_startup():
    print("Bot is ready!")

@listen(GuildJoin)
async def on_guild_join(event: GuildJoin):
    print(f"Guild joined : {event.guild.name}")

@slash_command(name="ping",description="test ping")
@integration_type(guild=True, user=True) 
async def ping(msg: SlashContext):
    await msg.send("hi")
bot.start(TOKEN)
cursive temple
robust sinew
#

please tell me how to make my command can be used everywhere. ofc we need to user install the bot

cursive temple
#

check your version of interactions

#

pip freeze is the fastest

robust sinew
#

its already fixed