Skip to content

Commit 51ea649

Browse files
committed
example.py
1 parent e95c7f3 commit 51ea649

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A Python package to retrieve detailed Spotify album images for Discord integrati
1010
```py
1111
import discord
1212
from discord.ext import commands
13-
from discordify import spotify
13+
from discordify import Spotify
1414

1515
bot = commands.Bot(
1616
command_prefix=",",
@@ -21,7 +21,7 @@ bot = commands.Bot(
2121
@bot.command(name="spotify")
2222
async def spotif(ctx: commands.Context, member: discord.Member = None):
2323
member = member or ctx.author
24-
client = spotify.Spotify(bot=bot, member=member)
24+
client = Spotify(bot=bot, member=member)
2525
content, image, view = await client.get()
2626
await ctx.reply(content=content, file=image, view=view)
2727

example.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
import discord
22
from discord.ext import commands
3-
from discordify import spotify
3+
from discordify import Spotify
44

5-
bot = commands.Bot(command_prefix=",")
5+
bot = commands.Bot(
6+
command_prefix=",",
7+
intents=discord.Intents.all(),
8+
allowed_mentions=discord.AllowedMentions.none()
9+
)
610

711
@bot.command(name="spotify")
812
async def spotif(ctx: commands.Context, member: discord.Member = None):
913
member = member or ctx.author
10-
client = spotify.Spotify(bot=bot, member=member)
14+
client = Spotify(bot=bot, member=member)
1115
content, image, view = await client.get()
1216
await ctx.reply(content=content, file=image, view=view)
1317

0 commit comments

Comments
 (0)