if user_id not in data: data[user_id] = {"milk": 0, "last_daily": None, "cat_name": f"{ctx.author.name}'s Cat"}
def load_data(): if not os.path.exists(DATA_FILE): return {} with open(DATA_FILE, "r") as f: return json.load(f)
def save_data(data): with open(DATA_FILE, "w") as f: json.dump(data, f, indent=4)
# Random milk amount: 5-15 import random milk_amount = random.randint(5, 15) data[user_id]["milk"] += milk_amount data[user_id]["last_daily"] = today save_data(data)
await ctx.send(f"🥛 **{ctx.author.display_name}**'s Milky Cat collected **{milk_amount} milk**! Total milk: {data[user_id]['milk']}")
@commands.command(name="rename_cat") async def rename_cat(self, ctx, *, new_name): """Rename your Milky Cat""" data = load_data() user_id = str(ctx.author.id) if user_id not in data: await ctx.send("You need to use `!milky_cat` first to adopt a cat.") return old_name = data[user_id]["cat_name"] data[user_id]["cat_name"] = new_name[:30] # limit length save_data(data) await ctx.send(f"✅ Renamed your cat from `{old_name}` to `{new_name}`.") async def setup(bot): await bot.add_cog(MilkyCatDMC(bot))
@commands.command(name="collect_milk") async def collect_milk(self, ctx): """Daily milk collection (DMC)""" data = load_data() user_id = str(ctx.author.id) today = str(date.today())
I notice you're asking about a feature for — but it’s unclear what exactly you’re looking for. "Milky Cat" could be a brand, a character, a game mod, a pet name, or a Discord bot ("dmc" might stand for Discord Music Client, Discord Moderation Commands, or even Devil May Cry in some contexts).