毎回同じアイコンで投稿すると飽きる
前回のブログではslackにpythonでテキストを投稿するコードを書きました。
しかし、このままでは毎回同じアイコンで投稿されると飽きます。(飽きますよね?)
そこでslackのアイコンを毎回適当な絵文字に置き換えられるようなコードを書いてみました。
コード
コード
def emoji_randam(num):
emoji = [":checkered_flag:",
":triangular_flag_on_post:",
":crossed_flags:",
":waving_black_flag:",
":waving_white_flag:",
":rainbow-flag:",
":flag-ac:",
":flag-ad:",
":flag-ae:",
":flag-af:",
":flag-ag:",
":flag-ai:",
":flag-al:",
":flag-am:",
":flag-ao:",
":flag-aq:",
":flag-ar:",
":flag-as:",
":flag-at:",
":flag-au:",
":flag-aw:",
":flag-ax:",
":flag-az:",
":flag-ba:",
":flag-bb:",
":flag-bd:",
":flag-be:",
":flag-bf:",
":flag-bg:",
":flag-bh:",
":flag-bi:",
":flag-bj:",
":flag-bl:",
":flag-bm:",
":flag-bn:",
":flag-bo:",
":flag-bq:",
":flag-br:",
":flag-bs:",
":flag-bt:",
":flag-bv:",
":flag-bw:",
":flag-by:",
":flag-bz:",
":flag-ca:",
":flag-cc:",
":flag-cd:",
":flag-cf:",
":flag-cg:",
":flag-ch:",
":flag-ci:",
":flag-ck:",
":flag-cl:",
":flag-cm:",
":cn:",
":flag-co:",
":flag-cp:",
":flag-cr:",
":flag-cu:",
":flag-cv:",
":flag-cw:",
":flag-cx:",
":flag-cy:",
":flag-cz:",
":de:",
":flag-dg:",
":flag-dj:",
":flag-dk:",
":flag-dm:",
":flag-do:",
":flag-dz:",
":flag-ea:",
":flag-ec:",
":flag-ee:",
":flag-eg:",
":flag-eh:",
":flag-er:",
":es:",
":flag-et:",
":flag-eu:",
":flag-fi:",
":flag-fj:",
":flag-fk:",
":flag-fm:",
":flag-fo:",
":fr:",
":flag-ga:",
":gb:",
":flag-gd:",
":flag-ge:",
":flag-gf:",
":flag-gg:",
":flag-gh:",
":flag-gi:",
":flag-gl:",
":flag-gm:",
":flag-gn:",
":flag-gp:",
":flag-gq:",
":flag-gr:",
":flag-gs:",
":flag-gt:",
":flag-gu:",
":flag-gw:",
":flag-gy:",
":flag-hk:",
":flag-hm:",
":flag-hn:",
":flag-hr:",
":flag-ht:",
":flag-hu:",
":flag-ic:",
":flag-id:",
":flag-ie:",
":flag-il:",
":flag-im:",
":flag-in:",
":flag-io:",
":flag-iq:",
":flag-ir:",
":flag-is:",
":it:",
":flag-je:",
":flag-jm:",
":flag-jo:",
":jp:",
":flag-ke:",
":flag-kg:",
":flag-kh:",
":flag-ki:",
":flag-km:",
":flag-kn:",
":flag-kp:",
":kr:",
":flag-kw:",
":flag-ky:",
":flag-kz:",
":flag-la:",
":flag-lb:",
":flag-lc:",
":flag-li:",
":flag-lk:",
":flag-lr:",
":flag-ls:",
":flag-lt:",
":flag-lu:",
":flag-lv:",
":flag-ly:",
":flag-ma:",
":flag-mc:",
":flag-md:",
":flag-me:",
":flag-mf:",
":flag-mg:",
":flag-mh:",
":flag-mk:",
":flag-ml:",
":flag-mm:",
":flag-mn:",
":flag-mo:",
":flag-mp:",
":flag-mq:",
":flag-mr:",
":flag-ms:",
":flag-mt:",
":flag-mu:",
":flag-mv:",
":flag-mw:",
":flag-mx:",
":flag-my:",
":flag-mz:",
":flag-na:",
":flag-nc:",
":flag-ne:",
":flag-nf:",
":flag-ng:",
":flag-ni:",
":flag-nl:",
":flag-no:",
":flag-np:",
":flag-nr:",
":flag-nu:",
":flag-nz:",
":flag-om:",
":flag-pa:",
":flag-pe:",
":flag-pf:",
":flag-pg:",
":flag-ph:",
":flag-pk:",
":flag-pl:",
":flag-pm:",
":flag-pn:",
":flag-pr:",
":flag-ps:",
":flag-pt:",
":flag-pw:",
":flag-py:",
":flag-qa:",
":flag-re:",
":flag-ro:",
":flag-rs:",
":ru:",
":flag-rw:",
":flag-sa:",
":flag-sb:",
":flag-sc:",
":flag-sd:",
":flag-se:",
":flag-sg:",
":flag-sh:",
":flag-si:",
":flag-sj:",
":flag-sk:",
":flag-sl:",
":flag-sm:",
":flag-sn:",
":flag-so:",
":flag-sr:",
":flag-ss:",
":flag-st:",
":flag-sv:",
":flag-sx:",
":flag-sy:",
":flag-sz:",
":flag-ta:",
":flag-tc:",
":flag-td:",
":flag-tf:",
":flag-tg:",
":flag-th:",
":flag-tj:",
":flag-tk:",
":flag-tl:",
":flag-tm:",
":flag-tn:",
":flag-to:",
":flag-tr:",
":flag-tt:",
":flag-tv:",
":flag-tw:",
":flag-tz:",
":flag-ua:",
":flag-ug:",
":flag-um:",
":flag-un:",
":us:",
":flag-uy:",
":flag-uz:",
":flag-va:",
":flag-vc:",
":flag-ve:",
":flag-vg:",
":flag-vi:",
":flag-vn:",
":flag-vu:",
":flag-wf:",
":flag-ws:",
":flag-xk:",
":flag-ye:",
":flag-yt:",
":flag-za:",
":flag-zm:",
":flag-zw:",
":flag-england:",
":flag-scotland:",
":flag-wales:",
":monkey_face:",
":monkey:",
":gorilla:",
":dog:",
":dog2:",
":poodle:",
":wolf:",
":fox_face:",
":cat:",
":cat2:",
":lion_face:",
":tiger:",
":tiger2:",
":leopard:",
":horse:",
":racehorse:",
":unicorn_face:",
":zebra_face:",
":deer:",
":cow:",
":ox:",
":water_buffalo:",
":cow2:",
":pig:",
":pig2:",
":boar:",
":pig_nose:",
":ram:",
":sheep:",
":goat:",
":dromedary_camel:",
":camel:",
":giraffe_face:",
":elephant:",
":rhinoceros:",
":mouse:",
":mouse2:",
":rat:",
":hamster:",
":rabbit:",
":rabbit2:",
":chipmunk:",
":hedgehog:",
":bat:",
":bear:",
":koala:",
":panda_face:",
":feet:",
":turkey:",
":chicken:",
":rooster:",
":hatching_chick:",
":baby_chick:",
":hatched_chick:",
":bird:",
":penguin:",
":dove_of_peace:",
":eagle:",
":duck:",
":owl:",
":frog:",
":crocodile:",
":turtle:",
":lizard:",
":snake:",
":dragon_face:",
":dragon:",
":sauropod:",
":t-rex:",
":whale:",
":whale2:",
":dolphin:",
":fish:",
":tropical_fish:",
":blowfish:",
":shark:",
":octopus:",
":shell:",
":crab:",
":shrimp:",
":squid:",
":snail:",
":butterfly:",
":bug:",
":ant:",
":bee:",
":beetle:",
":cricket:",
":spider:",
":spider_web:",
":scorpion:",
":bouquet:",
":cherry_blossom:",
":white_flower:",
":rosette:",
":rose:",
":wilted_flower:",
":hibiscus:",
":sunflower:",
":blossom:",
":tulip:",
":seedling:",
":evergreen_tree:",
":deciduous_tree:",
":palm_tree:",
":cactus:",
":ear_of_rice:",
":herb:",
":shamrock:",
":four_leaf_clover:",
":maple_leaf:",
":fallen_leaf:",
":leaves:",
":grapes:",
":melon:",
":watermelon:",
":tangerine:",
":lemon:",
":banana:",
":pineapple:",
":apple:",
":green_apple:",
":pear:",
":peach:",
":cherries:",
":strawberry:",
":kiwifruit:",
":tomato:",
":coconut:",
":avocado:",
":eggplant:",
":potato:",
":carrot:",
":corn:",
":hot_pepper:",
":cucumber:",
":broccoli:",
":mushroom:",
":peanuts:",
":chestnut:",
":bread:",
":croissant:",
":baguette_bread:",
":pretzel:",
":pancakes:",
":cheese_wedge:",
":meat_on_bone:",
":poultry_leg:",
":cut_of_meat:",
":bacon:",
":hamburger:",
":fries:",
":pizza:",
":hotdog:",
":sandwich:",
":taco:",
":burrito:",
":stuffed_flatbread:",
":egg:",
":fried_egg:",
":shallow_pan_of_food:",
":stew:",
":bowl_with_spoon:",
":green_salad:",
":popcorn:",
":canned_food:",
":bento:",
":rice_cracker:",
":rice_ball:",
":rice:",
":curry:",
":ramen:",
":spaghetti:",
":sweet_potato:",
":oden:",
":sushi:",
":fried_shrimp:",
":fish_cake:",
":dango:",
":dumpling:",
":fortune_cookie:",
":takeout_box:",
":icecream:",
":shaved_ice:",
":ice_cream:",
":doughnut:",
":cookie:",
":birthday:",
":cake:",
":pie:",
":chocolate_bar:",
":candy:",
":lollipop:",
":custard:",
":honey_pot:",
":baby_bottle:",
":glass_of_milk:",
":coffee:",
":tea:",
":sake:",
":champagne:",
":wine_glass:",
":cocktail:",
":tropical_drink:",
":beer:",
":beers:",
":clinking_glasses:",
":tumbler_glass:",
":cup_with_straw:",
":chopsticks:",
":knife_fork_plate:",
":fork_and_knife:",
":spoon:",
":hocho:",
":amphora:",
":grinning:",
":grin:",
":joy:",
":rolling_on_the_floor_laughing:",
":smiley:",
":smile:",
":sweat_smile:",
":laughing:",
":wink:",
":blush:",
":yum:",
":sunglasses:",
":heart_eyes:",
":kissing_heart:",
":kissing:",
":kissing_smiling_eyes:",
":kissing_closed_eyes:",
":relaxed:",
":slightly_smiling_face:",
":hugging_face:",
":star-struck:",
":thinking_face:",
":face_with_raised_eyebrow:",
":neutral_face:",
":expressionless:",
":no_mouth:",
":face_with_rolling_eyes:",
":smirk:",
":persevere:",
":disappointed_relieved:",
":open_mouth:",
":zipper_mouth_face:",
":hushed:",
":sleepy:",
":tired_face:",
":sleeping:",
":relieved:",
":stuck_out_tongue:",
":stuck_out_tongue_winking_eye:",
":stuck_out_tongue_closed_eyes:",
":drooling_face:",
":unamused:",
":sweat:",
":pensive:",
":confused:",
":upside_down_face:",
":money_mouth_face:",
":astonished:",
":white_frowning_face:",
":slightly_frowning_face:",
":confounded:",
":disappointed:",
":worried:",
":triumph:",
":cry:",
":sob:",
":frowning:",
":anguished:",
":fearful:",
":weary:",
":exploding_head:",
":grimacing:",
":cold_sweat:",
":scream:",
":flushed:",
":zany_face:",
":dizzy_face:",
":rage:",
":angry:",
":face_with_symbols_on_mouth:",
":mask:",
":face_with_thermometer:",
":face_with_head_bandage:",
":nauseated_face:",
":face_vomiting:",
":sneezing_face:",
":innocent:",
":face_with_cowboy_hat:",
":clown_face:",
":lying_face:",
":shushing_face:",
":face_with_hand_over_mouth:",
":face_with_monocle:",
":nerd_face:",
":smiling_imp:",
":imp:",
":japanese_ogre:",
":japanese_goblin:",
":skull:",
":skull_and_crossbones:",
":ghost:",
":alien:",
":space_invader:",
":robot_face:",
":hankey:",
":smiley_cat:",
":smile_cat:",
":joy_cat:",
":heart_eyes_cat:",
":smirk_cat:",
":kissing_cat:",
":scream_cat:",
":crying_cat_face:",
":pouting_cat:",
":see_no_evil:",
":hear_no_evil:",
":speak_no_evil:",
":baby:",
":child:",
":boy:",
":girl:",
":adult:",
":man:",
":woman:",
":older_adult:",
":older_man:",
":older_woman:",
":male-doctor:",
":female-doctor:",
":male-student:",
":female-student:",
":male-teacher:",
":female-teacher:",
":male-judge:",
":female-judge:",
":male-farmer:",
":female-farmer:",
":male-cook:",
":female-cook:",
":male-mechanic:",
":female-mechanic:",
":male-factory-worker:",
":female-factory-worker:",
":male-office-worker:",
":female-office-worker:",
":male-scientist:",
":female-scientist:",
":male-technologist:",
":female-technologist:",
":male-singer:",
":female-singer:",
":male-artist:",
":female-artist:",
":male-pilot:",
":female-pilot:",
":male-astronaut:",
":female-astronaut:",
":male-firefighter:",
":female-firefighter:",
":male-police-officer:",
":female-police-officer:",
":male-detective:",
":female-detective:",
":male-guard:",
":female-guard:",
":male-construction-worker:",
":female-construction-worker:",
":prince:",
":princess:",
":man-wearing-turban:",
":woman-wearing-turban:",
":man_with_gua_pi_mao:",
":person_with_headscarf:",
":bearded_person:",
":blond-haired-man:",
":blond-haired-woman:",
":man_in_tuxedo:",
":bride_with_veil:",
":pregnant_woman:",
":breast-feeding:",
":angel:",
":santa:",
":mrs_claus:",
":female_mage:",
":male_mage:",
":female_fairy:",
":male_fairy:",
":female_vampire:",
":male_vampire:",
":mermaid:",
":merman:",
":female_elf:",
":male_elf:",
":female_genie:",
":male_genie:",
":female_zombie:",
":male_zombie:",
":man-frowning:",
":woman-frowning:",
":man-pouting:",
":woman-pouting:",
":man-gesturing-no:",
":woman-gesturing-no:",
":man-gesturing-ok:",
":woman-gesturing-ok:",
":man-tipping-hand:",
":woman-tipping-hand:",
":man-raising-hand:",
":woman-raising-hand:",
":man-bowing:",
":woman-bowing:",
":man-facepalming:",
":woman-facepalming:",
":man-shrugging:",
":woman-shrugging:",
":man-getting-massage:",
":woman-getting-massage:",
":man-getting-haircut:",
":woman-getting-haircut:",
":man-walking:",
":woman-walking:",
":man-running:",
":woman-running:",
":dancer:",
":man_dancing:",
":man-with-bunny-ears-partying:",
":woman-with-bunny-ears-partying:",
":woman_in_steamy_room:",
":man_in_steamy_room:",
":woman_climbing:",
":man_climbing:",
":woman_in_lotus_position:",
":man_in_lotus_position:",
":bath:",
":sleeping_accommodation:",
":man_in_business_suit_levitating:",
":speaking_head_in_silhouette:",
":bust_in_silhouette:",
":busts_in_silhouette:",
":fencer:",
":horse_racing:",
":skier:",
":snowboarder:",
":man-golfing:",
":woman-golfing:",
":man-surfing:",
":woman-surfing:",
":man-rowing-boat:",
":woman-rowing-boat:",
":man-swimming:",
":woman-swimming:",
":man-bouncing-ball:",
":woman-bouncing-ball:",
":man-lifting-weights:",
":woman-lifting-weights:",
":man-biking:",
":woman-biking:",
":man-mountain-biking:",
":woman-mountain-biking:",
":racing_car:",
":racing_motorcycle:",
":man-cartwheeling:",
":woman-cartwheeling:",
":man-wrestling:",
":woman-wrestling:",
":man-playing-water-polo:",
":woman-playing-water-polo:",
":man-playing-handball:",
":woman-playing-handball:",
":man-juggling:",
":woman-juggling:",
":couple:",
":two_men_holding_hands:",
":two_women_holding_hands:",
":woman-kiss-man:",
":man-kiss-man:",
":woman-kiss-woman:",
":woman-heart-man:",
":man-heart-man:",
":woman-heart-woman:",
":man-woman-boy:",
":man-woman-girl:",
":man-woman-girl-boy:",
":man-woman-boy-boy:",
":man-woman-girl-girl:",
":man-man-boy:",
":man-man-girl:",
":man-man-girl-boy:",
":man-man-boy-boy:",
":man-man-girl-girl:",
":woman-woman-boy:",
":woman-woman-girl:",
":woman-woman-girl-boy:",
":woman-woman-boy-boy:",
":woman-woman-girl-girl:",
":man-boy:",
":man-boy-boy:",
":man-girl:",
":man-girl-boy:",
":man-girl-girl:",
":woman-boy:",
":woman-boy-boy:",
":woman-girl:",
":woman-girl-boy:",
":woman-girl-girl:",
":selfie:",
":muscle:",
":point_left:",
":point_right:",
":point_up:",
":point_up_2:",
":middle_finger:",
":point_down:",
":v:",
":crossed_fingers:",
":spock-hand:",
":the_horns:",
":call_me_hand:",
":raised_hand_with_fingers_splayed:",
":hand:",
":ok_hand:",
":+1:",
":-1:",
":fist:",
":facepunch:",
":left-facing_fist:",
":right-facing_fist:",
":raised_back_of_hand:",
":wave:",
":i_love_you_hand_sign:",
":writing_hand:",
":clap:",
":open_hands:",
":raised_hands:",
":two_hearts:",
":sparkling_heart:",
":heartpulse:",
":blue_heart:",
":green_heart:",
":yellow_heart:",
":orange_heart:",
":purple_heart:",
":black_heart:",
":gift_heart:",
":revolving_hearts:",
":heart_decoration:",
":heavy_heart_exclamation_mark_ornament:",
":love_letter:",
":zzz:",
":anger:",
":bomb:",
":boom:",
":sweat_drops:",
":dash:",
":dizzy:",
":speech_balloon:",
":left_speech_bubble:",
":right_anger_bubble:",
":thought_balloon:",
":hole:",
":eyeglasses:",
":dark_sunglasses:",
":necktie:",
":shirt:",
":jeans:",
":scarf:",
":gloves:",
":coat:",
":socks:",
":dress:",
":kimono:",
":bikini:",
":womans_clothes:",
":purse:",
":handbag:",
":pouch:",
":shopping_bags:",
":school_satchel:",
":mans_shoe:",
":athletic_shoe:",
":high_heel:",
":sandal:",
":boot:",
":crown:",
":womans_hat:",
":tophat:",
":mortar_board:",
":billed_cap:",
":helmet_with_white_cross:",
":prayer_beads:",
":lipstick:",
":ring:",
":gem:",
":mute:",
":speaker:",
":sound:",
":loud_sound:",
":loudspeaker:",
":mega:",
":postal_horn:",
":bell:",
":no_bell:",
":musical_score:",
":musical_note:",
":notes:",
":studio_microphone:",
":level_slider:",
":control_knobs:",
":microphone:",
":headphones:",
":radio:",
":saxophone:",
":guitar:",
":musical_keyboard:",
":trumpet:",
":violin:",
":drum_with_drumsticks:",
":iphone:",
":calling:",
":phone:",
":telephone_receiver:",
":pager:",
":fax:",
":battery:",
":electric_plug:",
":computer:",
":desktop_computer:",
":printer:",
":keyboard:",
":three_button_mouse:",
":trackball:",
":minidisc:",
":floppy_disk:",
":cd:",
":dvd:",
":movie_camera:",
":film_frames:",
":film_projector:",
":clapper:",
":tv:",
":camera:",
":camera_with_flash:",
":video_camera:",
":vhs:",
":mag:",
":mag_right:",
":microscope:",
":telescope:",
":satellite_antenna:",
":candle:",
":bulb:",
":flashlight:",
":izakaya_lantern:",
":notebook_with_decorative_cover:",
":closed_book:",
":book:",
":green_book:",
":blue_book:",
":orange_book:",
":books:",
":notebook:",
":ledger:",
":page_with_curl:",
":scroll:",
":page_facing_up:",
":newspaper:",
":rolled_up_newspaper:",
":bookmark_tabs:",
":bookmark:",
":label:",
":moneybag:",
":yen:",
":dollar:",
":euro:",
":pound:",
":money_with_wings:",
":credit_card:",
":chart:",
":currency_exchange:",
":heavy_dollar_sign:",
":email:",
":e-mail:",
":incoming_envelope:",
":envelope_with_arrow:",
":outbox_tray:",
":inbox_tray:",
":package:",
":mailbox:",
":mailbox_closed:",
":mailbox_with_mail:",
":mailbox_with_no_mail:",
":postbox:",
":ballot_box_with_ballot:",
":pencil2:",
":black_nib:",
":lower_left_fountain_pen:",
":lower_left_ballpoint_pen:",
":lower_left_paintbrush:",
":lower_left_crayon:",
":memo:",
":briefcase:",
":file_folder:",
":open_file_folder:",
":card_index_dividers:",
":date:",
":calendar:",
":spiral_note_pad:",
":spiral_calendar_pad:",
":card_index:",
":chart_with_upwards_trend:",
":chart_with_downwards_trend:",
":bar_chart:",
":clipboard:",
":pushpin:",
":round_pushpin:",
":paperclip:",
":linked_paperclips:",
":straight_ruler:",
":triangular_ruler:",
":scissors:",
":card_file_box:",
":file_cabinet:",
":wastebasket:",
":lock:",
":unlock:",
":lock_with_ink_pen:",
":closed_lock_with_key:",
":key:",
":old_key:",
":hammer:",
":pick:",
":hammer_and_pick:",
":hammer_and_wrench:",
":dagger_knife:",
":crossed_swords:",
":gun:",
":bow_and_arrow:",
":shield:",
":wrench:",
":nut_and_bolt:",
":gear:",
":compression:",
":alembic:",
":scales:",
":link:",
":chains:",
":syringe:",
":pill:",
":smoking:",
":coffin:",
":funeral_urn:",
":moyai:",
":oil_drum:",
":crystal_ball:",
":shopping_trolley:",
":atm:",
":put_litter_in_its_place:",
":potable_water:",
":wheelchair:",
":mens:",
":womens:",
":restroom:",
":baby_symbol:",
":wc:",
":passport_control:",
":customs:",
":baggage_claim:",
":left_luggage:",
":warning:",
":children_crossing:",
":no_entry:",
":no_entry_sign:",
":no_bicycles:",
":no_smoking:",
":do_not_litter:",
":non-potable_water:",
":no_pedestrians:",
":no_mobile_phones:",
":underage:",
":radioactive_sign:",
":biohazard_sign:",
":arrow_up:",
":arrow_upper_right:",
":arrow_right:",
":arrow_lower_right:",
":arrow_down:",
":arrow_lower_left:",
":arrow_left:",
":arrow_upper_left:",
":arrow_up_down:",
":left_right_arrow:",
":leftwards_arrow_with_hook:",
":arrow_right_hook:",
":arrow_heading_up:",
":arrow_heading_down:",
":arrows_clockwise:",
":arrows_counterclockwise:",
":back:",
":end:",
":on:",
":soon:",
":top:",
":place_of_worship:",
":atom_symbol:",
":om_symbol:",
":star_of_david:",
":wheel_of_dharma:",
":yin_yang:",
":latin_cross:",
":orthodox_cross:",
":star_and_crescent:",
":peace_symbol:",
":menorah_with_nine_branches:",
":six_pointed_star:",
":aries:",
":taurus:",
":gemini:",
":cancer:",
":leo:",
":virgo:",
":libra:",
":scorpius:",
":sagittarius:",
":capricorn:",
":aquarius:",
":pisces:",
":ophiuchus:",
":twisted_rightwards_arrows:",
":repeat:",
":repeat_one:",
":arrow_forward:",
":fast_forward:",
":black_right_pointing_double_triangle_with_vertical_bar:",
":black_right_pointing_triangle_with_double_vertical_bar:",
":arrow_backward:",
":rewind:",
":black_left_pointing_double_triangle_with_vertical_bar:",
":arrow_up_small:",
":arrow_double_up:",
":arrow_down_small:",
":arrow_double_down:",
":double_vertical_bar:",
":black_square_for_stop:",
":black_circle_for_record:",
":eject:",
":cinema:",
":low_brightness:",
":high_brightness:",
":signal_strength:",
":vibration_mode:",
":mobile_phone_off:",
":female_sign:",
":male_sign:",
":medical_symbol:",
":recycle:",
":fleur_de_lis:",
":trident:",
":name_badge:",
":beginner:",
":o:",
":white_check_mark:",
":ballot_box_with_check:",
":heavy_check_mark:",
":heavy_multiplication_x:",
":x:",
":negative_squared_cross_mark:",
":heavy_plus_sign:",
":heavy_minus_sign:",
":heavy_division_sign:",
":curly_loop:",
":loop:",
":part_alternation_mark:",
":eight_spoked_asterisk:",
":eight_pointed_black_star:",
":sparkle:",
":bangbang:",
":interrobang:",
":question:",
":grey_question:",
":grey_exclamation:",
":exclamation:",
":wavy_dash:",
":copyright:",
":registered:",
":tm:",
":hash:",
":keycap_star:",
":zero:",
":one:",
":two:",
":three:",
":four:",
":five:",
":six:",
":seven:",
":eight:",
":nine:",
":keycap_ten:",
":100:",
":capital_abcd:",
":abcd:",
":1234:",
":symbols:",
":abc:",
":a:",
":ab:",
":b:",
":cl:",
":cool:",
":free:",
":information_source:",
":id:",
":m:",
":new:",
":ng:",
":o2:",
":ok:",
":parking:",
":sos:",
":up:",
":vs:",
":koko:",
":sa:",
":u6708:",
":u6709:",
":u6307:",
":ideograph_advantage:",
":u5272:",
":u7121:",
":u7981:",
":accept:",
":u7533:",
":u5408:",
":u7a7a:",
":congratulations:",
":secret:",
":u55b6:",
":u6e80:",
":black_small_square:",
":white_small_square:",
":white_medium_square:",
":black_medium_square:",
":white_medium_small_square:",
":black_medium_small_square:",
":black_large_square:",
":white_large_square:",
":large_orange_diamond:",
":large_blue_diamond:",
":small_orange_diamond:",
":small_blue_diamond:",
":small_red_triangle:",
":small_red_triangle_down:",
":diamond_shape_with_a_dot_inside:",
":radio_button:",
":black_square_button:",
":white_square_button:",
":white_circle:",
":black_circle:",
":red_circle:",
":large_blue_circle:",
":earth_africa:",
":earth_americas:",
":earth_asia:",
":globe_with_meridians:",
":world_map:",
":japan:",
":snow_capped_mountain:",
":mountain:",
":volcano:",
":mount_fuji:",
":camping:",
":beach_with_umbrella:",
":desert:",
":desert_island:",
":national_park:",
":stadium:",
":classical_building:",
":building_construction:",
":house_buildings:",
":cityscape:",
":derelict_house_building:",
":house:",
":house_with_garden:",
":office:",
":post_office:",
":european_post_office:",
":hospital:",
":bank:",
":hotel:",
":love_hotel:",
":convenience_store:",
":school:",
":department_store:",
":factory:",
":japanese_castle:",
":european_castle:",
":wedding:",
":tokyo_tower:",
":statue_of_liberty:",
":church:",
":mosque:",
":synagogue:",
":shinto_shrine:",
":kaaba:",
":fountain:",
":tent:",
":foggy:",
":night_with_stars:",
":sunrise_over_mountains:",
":sunrise:",
":city_sunset:",
":city_sunrise:",
":bridge_at_night:",
":hotsprings:",
":milky_way:",
":carousel_horse:",
":ferris_wheel:",
":roller_coaster:",
":barber:",
":circus_tent:",
":performing_arts:",
":frame_with_picture:",
":art:",
":tent:",
":foggy:",
":night_with_stars:",
":sunrise_over_mountains:",
":sunrise:",
":city_sunset:",
":city_sunrise:",
":bridge_at_night:",
":hotsprings:",
":milky_way:",
":carousel_horse:",
":ferris_wheel:",
":roller_coaster:",
":barber:",
":circus_tent:",
":performing_arts:",
":frame_with_picture:",
":art:",
":slot_machine:",
":steam_locomotive:",
":railway_car:",
":bullettrain_side:",
":bullettrain_front:",
":train2:",
":metro:",
":light_rail:",
":station:",
":tram:",
":monorail:",
":mountain_railway:",
":train:",
":bus:",
":oncoming_bus:",
":trolleybus:",
":minibus:",
":ambulance:",
":fire_engine:",
":police_car:",
":oncoming_police_car:",
":taxi:",
":oncoming_taxi:",
":car:",
":oncoming_automobile:",
":blue_car:",
":truck:",
":articulated_lorry:",
":tractor:",
":bike:",
":scooter:",
":motor_scooter:",
":busstop:",
":motorway:",
":railway_track:",
":fuelpump:",
":rotating_light:",
":traffic_light:",
":vertical_traffic_light:",
":construction:",
":octagonal_sign:",
":anchor:",
":boat:",
":canoe:",
":speedboat:",
":passenger_ship:",
":ferry:",
":motor_boat:",
":ship:",
":airplane:",
":small_airplane:",
":airplane_departure:",
":airplane_arriving:",
":seat:",
":helicopter:",
":suspension_railway:",
":mountain_cableway:",
":aerial_tramway:",
":satellite:",
":rocket:",
":flying_saucer:",
":bellhop_bell:",
":door:",
":bed:",
":couch_and_lamp:",
":toilet:",
":shower:",
":bathtub:",
":hourglass:",
":hourglass_flowing_sand:",
":watch:",
":alarm_clock:",
":stopwatch:",
":timer_clock:",
":mantelpiece_clock:",
":clock12:",
":clock1230:",
":clock1:",
":clock130:",
":clock2:",
":clock230:",
":clock3:",
":clock330:",
":clock4:",
":clock430:",
":clock5:",
":clock530:",
":clock6:",
":clock630:",
":clock7:",
":clock730:",
":clock8:",
":clock830:",
":clock9:",
":clock930:",
":clock10:",
":clock1030:",
":clock11:",
":clock1130:",
":new_moon:",
":waxing_crescent_moon:",
":first_quarter_moon:",
":moon:",
":full_moon:",
":waning_gibbous_moon:",
":last_quarter_moon:",
":waning_crescent_moon:",
":crescent_moon:",
":new_moon_with_face:",
":first_quarter_moon_with_face:",
":last_quarter_moon_with_face:",
":thermometer:",
":sunny:",
":full_moon_with_face:",
":sun_with_face:",
":star:",
":star2:",
":stars:",
":cloud:",
":partly_sunny:",
":thunder_cloud_and_rain:",
":mostly_sunny:",
":barely_sunny:",
":partly_sunny_rain:",
":rain_cloud:",
":snow_cloud:",
":lightning:",
":tornado:",
":fog:",
":wind_blowing_face:",
":cyclone:",
":rainbow:",
":closed_umbrella:",
":umbrella:",
":umbrella_with_rain_drops:",
":umbrella_on_ground:",
":zap:",
":snowflake:",
":snowman:",
":snowman_without_snow:",
":comet:",
":fire:",
":droplet:",
":ocean:",
":jack_o_lantern:",
":christmas_tree:",
":fireworks:",
":sparkler:",
":sparkles:",
":balloon:",
":tada:",
":confetti_ball:",
":tanabata_tree:",
":bamboo:",
":dolls:",
":flags:",
":wind_chime:",
":rice_scene:",
":ribbon:",
":gift:",
":reminder_ribbon:",
":admission_tickets:",
":ticket:",
":medal:",
":trophy:",
":sports_medal:",
":first_place_medal:",
":second_place_medal:",
":third_place_medal:",
":soccer:",
":baseball:",
":basketball:",
":volleyball:",
":football:",
":rugby_football:",
":tennis:",
":8ball:",
":bowling:",
":cricket_bat_and_ball:",
":field_hockey_stick_and_ball:",
":ice_hockey_stick_and_puck:",
":table_tennis_paddle_and_ball:",
":badminton_racquet_and_shuttlecock:",
":boxing_glove:",
":martial_arts_uniform:",
":goal_net:",
":dart:",
":golf:",
":ice_skate:",
":fishing_pole_and_fish:",
":running_shirt_with_sash:",
":ski:",
":sled:",
":curling_stone:",
":video_game:",
":joystick:",
":game_die:",
":spades:",
":hearts:",
":diamonds:",
":clubs:",
":black_joker:",
":mahjong:",
":flower_playing_cards:"
]
num = int(num * len(emoji));
return(emoji[num]);
これで実行できます。
import random
print(emoji_randam(random.random()))
以下で絵文字のコード(:hearts:
のような文字列)を受け取りできます。前回のコードだと、
"icon_emoji" : emoji_randam(random.random())
と変更することにより、毎回違うアイコンで投稿することができます。
どうでもいい機能ですが、毎日違うアイコンだと楽しいですよね。