We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class notify(commands.Cog): def __init__(self, bot): self.bot = bot self.channels = { "Airi Viridis Ch. 【V-Dere】": f"@AiriViridis" } self.videos = {} @commands.Cog.listener() async def on_ready(self): self.check.start() @tasks.loop(seconds=60) async def check(self): discord_channel = self.bot.get_channel(838365746069372982) for channel_name in self.channels: videos = scrapetube.get_channel(channel_url=self.channels[channel_name], limit=1,content_type="streams") video_ids = [video["videoId"] for video in videos] print(video_ids) if self.check.current_loop == 0: self.videos[channel_name] = video_ids continue for video_id in video_ids: if video_id not in self.videos[channel_name]: url = f"https://youtu.be/{video_id}" await discord_channel.send(f"@everyone\n{url}") self.videos[channel_name] = video_ids def setup(bot): bot.add_cog(notify(bot))
I dont know if i'm doing something wrong, but when the bot is running, it sends old videos, like 1 month o more
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I dont know if i'm doing something wrong, but when the bot is running, it sends old videos, like 1 month o more
The text was updated successfully, but these errors were encountered: